Re: [rspec-users] controller.expect_render has me beat!

2007-09-14 Thread Luis Lavena
On 9/15/07, s.ross <[EMAIL PROTECTED]> wrote: > Look at your test.log and you can see exactly what was rendered. That should > explain why the example is failing. This works best if you can silence the > logs for all examples other than the one you are testing. > Better if you run just that exampl

Re: [rspec-users] controller.expect_render has me beat!

2007-09-14 Thread s.ross
Look at your test.log and you can see exactly what was rendered. That should explain why the example is failing. This works best if you can silence the logs for all examples other than the one you are testing. On Sep 14, 2007, at 7:35 PM, sinclair bain wrote: Hi, A controller has a method

Re: [rspec-users] Posted this in "dev" last night but I'm not sure that anyone reads it

2007-09-14 Thread Evan David Light
On Sep 14, 2007, at 7:10 PM, Pat Maddox wrote: > I agree that it would be nice if story runner treats an empty > Given/When/Then as pending. But what do you mean it treats pending as > an error case? The actual implementation of how a Scenario is defined as pending. The implementation raises

Re: [rspec-users] Posted this in "dev" last night but I'm not sure that anyone reads it

2007-09-14 Thread Evan David Light
On Sep 14, 2007, at 7:10 PM, Pat Maddox wrote: > I agree that it would be nice if story runner treats an empty > Given/When/Then as pending. But what do you mean it treats pending as > an error case? > Resending. Believe that my re-reponse, sent a couple of hours ago, was eaten. ;-) The act

Re: [rspec-users] Mocks in StoryRunner

2007-09-14 Thread James Hughes
On 9/14/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > On 9/14/07, James Hughes <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm trying to get up and running with StoryRunner. I have a story that > > looks something like the following, but the call to mock_model > > produces the exception listed below.

[rspec-users] controller.expect_render has me beat!

2007-09-14 Thread sinclair bain
Hi, A controller has a method with the following def update ... if @config.update_attributes ( params[:new_config] ) redirect_to :action => :index else * render :action => :edit, :id => params[:id] # this line here* end ... end The example has the following

Re: [rspec-users] Mocks in StoryRunner

2007-09-14 Thread Pat Maddox
On 9/14/07, James Hughes <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to get up and running with StoryRunner. I have a story that > looks something like the following, but the call to mock_model > produces the exception listed below. Am I just misunderstanding the > concept? Are mocks not meant

[rspec-users] Mocks in StoryRunner

2007-09-14 Thread James Hughes
Hi, I'm trying to get up and running with StoryRunner. I have a story that looks something like the following, but the call to mock_model produces the exception listed below. Am I just misunderstanding the concept? Are mocks not meant to be used in stories like this? Or is this a bug? Changing @us

Re: [rspec-users] Posted this in "dev" last night but I'm not sure that anyone reads it

2007-09-14 Thread Pat Maddox
On 9/14/07, Evan David Light <[EMAIL PROTECTED]> wrote: > > I've been using RSpec in anger for perhaps a total of a few days and just > started playing with Story Runner. Love it. > > I also started working on a patch, which ought to be simple, to allow for > Scenarios without supplied blocks t

[rspec-users] controller.expect_render has me beat!

2007-09-14 Thread sinclair bain
Hi, A controller has a method with the following def update ... if @config.update_attributes( params[:new_config] ) redirect_to :action => :index else * render :action => :edit, :id => params[:id] # this line here* end ... end The example has the following it

[rspec-users] ProfileFormatter (Top 10 slowest examples)

2007-09-14 Thread Ian Leitch
Hey list, The time it takes for my specs to run is starting to get a little long (~45 seconds), and annoying enough for me to do something about it. I've written a simple formatter that prints out the top 10 slowest examples in an attempt to identify any low hanging fruit amongst a spec suite. h

[rspec-users] Posted this in "dev" last night but I'm not sure that anyone reads it

2007-09-14 Thread Evan David Light
I've been using RSpec in anger for perhaps a total of a few days and just started playing with Story Runner. Love it. I also started working on a patch, which ought to be simple, to allow for Scenarios without supplied blocks to be treated as pending -- much like "it" in Spec::DSL::Exam

[rspec-users] using #include in shared behaviours

2007-09-14 Thread Tom Stuart
Hi folks, Is there any way I can call #include from within a shared behaviour without it blowing up?: > vendor/plugins/rspec/lib/spec/dsl/shared_behaviour.rb:48:in > `included': private method `include' called for # > (NoMethodError) More detail: I have a spec/concerns directory which cont

Re: [rspec-users] Testing a nested controller

2007-09-14 Thread Jarkko Laine
On 14.9.2007, at 12.02, Andreas Wolff wrote: Hey everyone. I really stuck on testing a nested controller. I'm trying to make a request using get and afterwards checking the response by response.should ... My routes.rb looks like this: map.resources :writers do |writers| writers.resources :no

Re: [rspec-users] Testing a nested controller

2007-09-14 Thread Andreas Wolff
Ok. this was stupid :) I found the answer two minutes later: You cannot use the url helper here, but if you provide the writers id in the request everything works fine: testing the route: route_for(:controller => "notes", :action => "show", :id => 1, :writer_id => 1) testing the request by: get

[rspec-users] Testing a nested controller

2007-09-14 Thread Andreas Wolff
Hey everyone. I really stuck on testing a nested controller. I'm trying to make a request using get and afterwards checking the response by response.should ... My routes.rb looks like this: map.resources :writers do |writers| writers.resources :notes end In my notes_controller_spec.rb def do_