Perryn Fowler
2007-Apr-12 08:12 UTC
[rspec-users] rspec on rails: undefined method ''controller_name''
Im trying to write a controller spec, but when I run it I get an error like the one below. I found Bug6707 (http://rubyforge.org/pipermail/rspec-devel/2007-March/002147.html ), but I get the error no matter how I run the spec ( whether I use rake or not) Any ideas? I am using 0.8.2 The Error: C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/expectati ons/sugar.rb:14:in `call'': undefined method `controller_name'' for #<Spec::Runner ::ContextEvalModule:0x35e6a98> (NoMethodError) from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- 0.8.2 /lib/s pec/expectations/sugar.rb:14:in `_method_missing'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /lib/s pec/expectations/sugar.rb:10:in `method_missing'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- 0.8.2 /lib/s pec/runner/context_eval.rb:47:in `method_missing'' from ./spec/functional/booking_sheet_spec.rb:4 from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /lib/s pec/runner/context.rb:14:in `class_eval'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /lib/s pec/runner/context.rb:14:in `initialize'' from C:/dev/teetime/vendor/plugins/rspec_on_rails/lib/spec/rails/runner/ context_factory.rb:37:in `new'' from C:/dev/teetime/vendor/plugins/rspec_on_rails/lib/spec/rails/runner/ context_factory.rb:37:in `create'' from C:/dev/teetime/vendor/plugins/rspec_on_rails/lib/spec/rails/extensi ons/kernel.rb:4:in `context'' from ./spec/functional/booking_sheet_spec.rb:3 from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /lib/s pec/runner/command_line.rb:24:in `load'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- 0.8.2 /lib/s pec/runner/command_line.rb:24:in `run'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /lib/s pec/runner/command_line.rb:18:in `each'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- 0.8.2 /lib/s pec/runner/command_line.rb:18:in `run'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /bin/s pec:4 from C:/rails/InstantRails/ruby/bin/spec:18:in `load'' from C:/rails/InstantRails/ruby/bin/spec:18 -- ----------------------- Perryn Fowler ThoughtWorks -- ----------------------- Perryn Fowler ThoughtWorks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070412/1a73ff0f/attachment.html
aslak hellesoy
2007-Apr-12 09:30 UTC
[rspec-users] rspec on rails: undefined method ''controller_name''
On 4/12/07, Perryn Fowler <pezlists at gmail.com> wrote:> > > Im trying to write a controller spec, but when I run it I get an error like > the one below. > > I found Bug6707 ( > http://rubyforge.org/pipermail/rspec-devel/2007-March/002147.html > ), but I get the error no matter how I run the spec > ( whether I use rake or not) > > Any ideas? > > I am using 0.8.2 > > The Error: >Hi Perryn, I haven''t tried to dig into this to find the error, but could you please try with RSpec 0.9.0 beta1? http://www.nabble.com/ANN:-RSpec-0.9.0-beta-1-available-for-download.-t3526973.html Cheers, Aslak> C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/expectati > ons/sugar.rb:14:in `call'': undefined method `controller_name'' for > #<Spec::Runner > ::ContextEvalModule:0x35e6a98> (NoMethodError) > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- > 0.8.2/lib/s > pec/expectations/sugar.rb:14:in `_method_missing'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/s > pec/expectations/sugar.rb:10:in `method_missing'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- > 0.8.2/lib/s > pec/runner/context_eval.rb:47:in `method_missing'' > from ./spec/functional/booking_sheet_spec.rb:4 > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/s > pec/runner/context.rb:14:in `class_eval'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/s > pec/runner/context.rb:14:in `initialize'' > from > C:/dev/teetime/vendor/plugins/rspec_on_rails/lib/spec/rails/runner/ > context_factory.rb:37:in `new'' > from > C:/dev/teetime/vendor/plugins/rspec_on_rails/lib/spec/rails/runner/ > context_factory.rb:37:in `create'' > from > C:/dev/teetime/vendor/plugins/rspec_on_rails/lib/spec/rails/extensi > ons/kernel.rb:4:in `context'' > from ./spec/functional/booking_sheet_spec.rb:3 > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/s > pec/runner/command_line.rb:24:in `load'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- > 0.8.2/lib/s > pec/runner/command_line.rb:24:in `run'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/s > pec/runner/command_line.rb:18:in `each'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- > 0.8.2/lib/s > pec/runner/command_line.rb:18:in `run'' > from > C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/s > pec:4 > from C:/rails/InstantRails/ruby/bin/spec:18:in > `load'' > from C:/rails/InstantRails/ruby/bin/spec:18 > > > -- > ----------------------- > Perryn Fowler > ThoughtWorks > > -- > ----------------------- > Perryn Fowler > ThoughtWorks > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >