[rspec-users] Fixture name not available as class variable in spec

Keith McDonnell keith at dancingtext.com
Wed Feb 28 10:22:03 EST 2007

Hi there,

I can't seem to access the fixture name as a class variable from my 
specs. I have to set the variable in the spec setup.

... [fixtures]

   id: 1

... [rpsec]

@my_fixture.id.should == 1

... [error]

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.id

... [my setup]

RSpec- (r1395) - BDD for Ruby
Rails 1.2.2
Latest rspec_on_rails plugin

Is this this a bug or a feature ?


More information about the rspec-users mailing list