Re: [rspec-users] How to expect no layout

2008-11-11 Thread Nick Hoffman
On 2008-11-11, at 05:46, Fernando Perez wrote: Nick Hoffman wrote: Hey guys. I've told one of my controllers to not render a layout for a certain action: layout false, :only = :map_info_window Now I'm trying to spec that, but this: it 'should not render a layout' do

Re: [rspec-users] any way to have a different SOUND from growl for a 'pass' rather than a 'fail' when using ./script/autospec ???

2008-11-11 Thread Greg Hauptmann
thanks Chris - the help in http://gist.github.com/23649 worked great On Tue, Nov 11, 2008 at 7:51 AM, Christopher Bailey [EMAIL PROTECTED] wrote: I'm not sure what platform you're on, or if this is what you're after, but the .autospec I use on the Mac uses the built in speech stuff to say what

Re: [rspec-users] Installing rspec, cucumber, et al.

2008-11-11 Thread James B. Byrne
On Tue, November 11, 2008 15:05, David Chelimsky wrote: You must have installed rspec during the short time we were using git-submodules. You'll want to remove them and reinstall as plugins (or as gems). Here's some info on un-doing git-submodules: Removing git submodules is

[rspec-users] Installing rspec, cucumber, et al.

2008-11-11 Thread James B. Byrne
I have a project that I am returning to after some time away on other issues. When last I worked on it I had rspec and rspec for rails installed as git submodules but I recall that I also had to have rspec installed as a gem and that the gem and the plugin versions had to exactly match. Having

Re: [rspec-users] Installing rspec, cucumber, et al.

2008-11-11 Thread David Chelimsky
On Tue, Nov 11, 2008 at 2:16 PM, James B. Byrne [EMAIL PROTECTED] wrote: On Tue, November 11, 2008 15:05, David Chelimsky wrote: You must have installed rspec during the short time we were using git-submodules. You'll want to remove them and reinstall as plugins (or as gems). Here's some

Re: [rspec-users] Installing rspec, cucumber, et al.

2008-11-11 Thread Scott Taylor
On Nov 11, 2008, at 3:44 PM, David Chelimsky wrote: On Tue, Nov 11, 2008 at 2:16 PM, James B. Byrne [EMAIL PROTECTED] lyne.ca wrote: On Tue, November 11, 2008 15:05, David Chelimsky wrote: You must have installed rspec during the short time we were using git-submodules. You'll want to

Re: [rspec-users] Installing rspec, cucumber, et al.

2008-11-11 Thread James B. Byrne
On Tue, November 11, 2008 15:44, David Chelimsky wrote: Your options are: system gems vendor/gems vendor/plugins The rspec-rails gem has a hard dependency on the rspec gem of the same version, so if you install rspec-rails-1.1.11.gem with dependencies, it will install rspec-1.1.11.gem

Re: [rspec-users] Specs for authorisation

2008-11-11 Thread Nick Hoffman
On 2008-11-11, at 00:53, Pat Maddox wrote: Nick Hoffman [EMAIL PROTECTED] writes: I'm writing specs to check that certain user types are authorised to access certain controller actions. In addition to writing specs for authorised user types and for users who aren't logged-in, I feel that I

Re: [rspec-users] Installing rspec, cucumber, et al.

2008-11-11 Thread aslak hellesoy
On Tue, Nov 11, 2008 at 9:00 PM, James B. Byrne [EMAIL PROTECTED] wrote: I am confused. I ran this in my rails project root: $ git submodule status 3b76fda741dfe2de84b4d5a33766653589ad36fb vendor/plugins/rspec (1.1.4-22-g3b76fda) 5adb47e5bed39569b435fadf8c34bd836d4287d3

Re: [rspec-users] How to expect no layout

2008-11-11 Thread Fernando Perez
Nick Hoffman wrote: Hey guys. I've told one of my controllers to not render a layout for a certain action: layout false, :only = :map_info_window Now I'm trying to spec that, but this: it 'should not render a layout' do controller.expect_render :layout do_get end

Re: [rspec-users] Specing based on user roles

2008-11-11 Thread Nick Hoffman
On 2008-11-11, at 17:24, Fernando Perez wrote: I've really moved away from shared example groups and started writing more targeted macros. So I might do something like this: def for_roles *roles roles.each do |role| before(:each) { login_as role } yield end end describe

Re: [rspec-users] Specing based on user roles

2008-11-11 Thread Fernando Perez
Nick Hoffman wrote: On 2008-11-11, at 17:24, Fernando Perez wrote: describe OrdersController do for_roles :admin, :sysadmin do |role| login_as look like? And where do you put this code? I am not sure mine (if working) gets initialized correctly. I think I have to write my specs from

[rspec-users] what triggers ./script/autospec to kick in? when I change my model it doesn't always retest

2008-11-11 Thread Greg Hauptmann
Hi, Does anyone know what exactly trigger autospec to rerun tests? I ask as I have a model file that has spec tests for it, but I've noticed when I fix the line in the model file it's not automatically retriggering a retest (where I'd expect to see a pass whereas before it was a fail). If I

[rspec-users] Mixing in spec helper methods

2008-11-11 Thread Nick Hoffman
I've written a module for my specs that contains a helper method, and am mixing the module into my specs with #include . It seems that the method must be called with an #it block. If it isn't, this error occurs: ... in `method_missing': undefined method

Re: [rspec-users] Mixing in spec helper methods

2008-11-11 Thread Ben Mabey
Nick Hoffman wrote: I've written a module for my specs that contains a helper method, and am mixing the module into my specs with #include . It seems that the method must be called with an #it block. If it isn't, this error occurs: ... in `method_missing': undefined method

Re: [rspec-users] Mixing in spec helper methods

2008-11-11 Thread Pat Maddox
Nick Hoffman [EMAIL PROTECTED] writes: I've written a module for my specs that contains a helper method, and am mixing the module into my specs with #include . It seems that the method must be called with an #it block. If it isn't, this error occurs: ... in `method_missing': undefined

Re: [rspec-users] Correct way to spec partials

2008-11-11 Thread Jesse Clark
On Oct 26, 4:49 am, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Oct 23, 2008 at 8:07 PM, Oleksandr Rudyk [EMAIL PROTECTED] wrote: Hi everybody, 1) Does anybody have full working example of how to test partial templates? 2) What the correct place to testpartials: controller or view

Re: [rspec-users] Mixing in spec helper methods

2008-11-11 Thread David Chelimsky
On Tue, Nov 11, 2008 at 6:39 PM, Pat Maddox [EMAIL PROTECTED] wrote: Nick Hoffman [EMAIL PROTECTED] writes: I've written a module for my specs that contains a helper method, and am mixing the module into my specs with #include . It seems that the method must be called with an #it block. If it

Re: [rspec-users] Is this a bug?

2008-11-11 Thread David Chelimsky
On Tue, Nov 11, 2008 at 11:22 PM, Richard Lloyd [EMAIL PROTECTED] wrote: I'm new to rspec and, of course, my first time out and I'm tripped up by what appears to me to be a bug. A simple demonstration: script/generate rspec_scaffold GoodDocument title:string body:text From