[rspec-devel] [ rspec-Patches-14109 ] RailsStory dies badly when no fixtures present

noreply at rubyforge.org noreply at rubyforge.org
Thu Sep 20 13:04:09 EDT 2007


Patches item #14109, was opened at 2007-09-20 17:04
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=14109&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: James Hughes (jpath)
Assigned to: Nobody (None)
Summary: RailsStory dies badly when no fixtures present

Initial Comment:
A story like the following: 

Story 'Something happens', %{
 As a user
 I want to do something
 So that something will happen.
}, :type => RailsStory do

 Scenario 'User doing something for first time' do
   Given 'a user' do
     @user = User.new
   end
   When 'the user makes a request' do
     post '/some_action', :id => 1
   end
   Then 'something should happen' do
   end
 end
end

will die attempting to post when there are no fixtures present (at least, I think that's what's happening.) It dies at the following line in rails/actionpack/lib/action_controller/integration.rb:

      self.class.fixture_table_names.each do |table_name|

'self.class' at this point is RailsStory. The attached patch just initializes fixture_table_names to an empty array.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=14109&group_id=797


More information about the rspec-devel mailing list