[rspec-devel] [ rspec-Bugs-12153 ] got undifined method 'fixtures' for spec

noreply at rubyforge.org noreply at rubyforge.org
Tue Jul 10 08:25:40 EDT 2007


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

Category: rails plugin
Group: None
Status: Closed
Resolution: Rejected
Priority: 3
Submitted By: Akhil Bansal (bansalakhil)
Assigned to: David Chelimsky (dchelimsky)
Summary: got undifined method 'fixtures' for spec

Initial Comment:
I am using rails 1.2.3 and rspec 1.0.5. 

When I tried to run spec with "ruby script\spec  spec\models\users.rb  -b", I stuck with following error



C:\Akhil\ror\kewl with rspec>ruby script\spec  spec\models\users.rb  -b
C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb:137:in `method_missing': undefined method `fixtures' for #<Spec::DSL::Ev
alModule:0x45b2c4c> (NoMethodError)
        from ./spec\models\users.rb:4
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:54:in `class_eval'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:54:in `eval_behaviour'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:31:in `initialize'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/dsl/behaviour_factory.rb:36:in `new'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/dsl/behaviour_factory.rb:36:in `create'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/extensions/kernel.rb:24:in `describe'
        from ./spec\models\users.rb:3
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:85:in `load'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:85:in `load_specs'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:84:in `each'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:84:in `load_specs'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:22:in `run'
        from C:/Akhil/ror/kewl with rspec/vendor/plugins/rspec/lib/spec/runner/command_line.rb:17:in `run'
        from script/spec:4


any idea?

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

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-07-10 08:25

Message:
You may also have been bitten by this bug:
http://rubyforge.org/tracker/index.php?func=detail&aid=10534&group_id=797&atid=3149

The bug exists in RSpec 1.0.5 and should be gone with the next release. It's fixed on trunk, so you may want to try with that to see if your problem goes away.

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-07-10 08:19

Message:
RSpec wants the file to be called user_spec.rb. If you don't want to call it that, you can do this:

describe User, :behaviour_type => :model do
  ...
end



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

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


More information about the rspec-devel mailing list