Hello everybody, I am experiencing the following problems, I googled quickly but I couldn''t find any documentation or solution to those issues: 1) the generator rails g rspec:helper does nothing; 2) there seems to be no way to test helper methods as I used to do... for example the following spec it ''should set monday as first day of the week'' do helper.ordered_day_names.first.should == ''Lun'' end raises the error undefined local variable or method `helper'' for #<Rspec::Core::ExampleGroup::Nested_2::Nested_1:0x2da5d10> 3) testing views where I call helper methods I need to explicitly stub out the helper methods, even if I include the helper module. This all happens with rspec beta 8, rails 3.0beta3, and ruby 1.9.2 Regards Andrea
On May 7, 2010, at 5:59 AM, andrea longhi wrote:> Hello everybody, > > I am experiencing the following problems, I googled quickly but I > couldn''t find any documentation or solution to those issues: > > 1) the generator rails g rspec:helper does nothing;See Known Issues on http://github.com/rspec/rspec-rails. Helper specs are coming soon - certainly before any final release - but not yet.> 2) there seems to be no way to test helper methods as I used to do... > for example > the following spec > it ''should set monday as first day of the week'' do > helper.ordered_day_names.first.should == ''Lun'' > end > raises the error undefined local variable or method `helper'' for > #<Rspec::Core::ExampleGroup::Nested_2::Nested_1:0x2da5d10> > 3) testing views where I call helper methods I need to explicitly stub > out the helper methods, even if I include the helper module. > > This all happens with rspec beta 8, rails 3.0beta3, and ruby 1.9.2 > > Regards > Andrea > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
from: http://github.com/rspec/rspec-rails - no helper specs (yet) - no routing specs (yet) - only works with ActiveRecord (for now) On 7 May 2010 11:59, andrea longhi <longhiandrea at gmail.com> wrote:> Hello everybody, > > I am experiencing the following problems, I googled quickly but I > couldn''t find any documentation or solution to those issues: > > 1) the generator rails g rspec:helper does nothing; > 2) there seems to be no way to test helper methods as I used to do... > for example > the following spec > it ''should set monday as first day of the week'' do > helper.ordered_day_names.first.should == ''Lun'' > end > raises the error undefined local variable or method `helper'' for > #<Rspec::Core::ExampleGroup::Nested_2::Nested_1:0x2da5d10> > 3) testing views where I call helper methods I need to explicitly stub > out the helper methods, even if I include the helper module. > > This all happens with rspec beta 8, rails 3.0beta3, and ruby 1.9.2 > > Regards > Andrea > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100507/cf027d6b/attachment.html>