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

noreply at rubyforge.org noreply at rubyforge.org
Tue Jul 10 08:19:37 EDT 2007


Bugs item #12153, was opened at 2007-07-10 12: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: David Chelimsky (dchelimsky)
Date: 2007-07-10 12: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