[rspec-devel] [ rspec-Bugs-8145 ] fixture use in context_setup bails

noreply at rubyforge.org noreply at rubyforge.org
Thu Jan 25 10:35:35 EST 2007


Bugs item #8145, was opened at 2007-01-25 10:35
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=8145&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jodi Showers (jodishowers)
Assigned to: Nobody (None)
Summary: fixture use in context_setup bails

Initial Comment:
It appears that fixtures are not permissible within a context_setup.

context "Given a Project fixture, " do
  fixtures :projects

  context_setup do
    @project = projects(:project_one)
  end

....

end

Results:

1)
NoMethodError in 'Given a Project fixture,  context_setup'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]
./spec/models/project_spec.rb:56:



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

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


More information about the rspec-devel mailing list