Hi, My helper specs were going ok until I added a call to a rails DateHelper method in one of my helpers http://api.rubyonrails.com/classes/ActionView/Helpers/ DateHelper.html#M000574 The helper runs fine from my view templates, just dies in the spec test. I boiled my question down to a simple (not too useful) example. I''m not sure what I''m missing. # application_helper.rb module ApplicationHelper def app_foo t = Time.now distance_of_time_in_words( t, t + 50.minutes) return true end end # application_helper_spec.rb require File.dirname(__FILE__) + ''/../spec_helper'' describe ApplicationHelper do it "should find app_foo in application_helpers.rb" do app_foo.should be_true end end # error output NoMethodError in ''ApplicationHelper should find app_foo in application_helpers.rb'' undefined method `distance_of_time_in_words'' for [Dynamically generated class for RSpec example]:#<Class:0x32d11c8>
David Chelimsky
2007-Jul-31 09:50 UTC
[rspec-users] helper spec not finding rails core helpers
On 7/30/07, linojon <linojon at gmail.com> wrote:> Hi, > > My helper specs were going ok until I added a call to a rails > DateHelper method in one of my helpers > http://api.rubyonrails.com/classes/ActionView/Helpers/ > DateHelper.html#M000574 > > The helper runs fine from my view templates, just dies in the spec test. > > I boiled my question down to a simple (not too useful) example. I''m > not sure what I''m missing. > > # application_helper.rb > module ApplicationHelper > > def app_foo > t = Time.now > distance_of_time_in_words( t, t + 50.minutes) > return true > end > end > > # application_helper_spec.rb > require File.dirname(__FILE__) + ''/../spec_helper'' > > describe ApplicationHelper do > it "should find app_foo in application_helpers.rb" do > app_foo.should be_true > end > end > > # error output > NoMethodError in ''ApplicationHelper should find app_foo in > application_helpers.rb'' > undefined method `distance_of_time_in_words'' for [Dynamically > generated class for RSpec example]:#<Class:0x32d11c8>Please put bug reports, feature requests, and patches here: http://rubyforge.org/tracker/index.php?group_id=797> _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky
2007-Jul-31 10:20 UTC
[rspec-users] helper spec not finding rails core helpers
On 7/31/07, David Chelimsky <dchelimsky at gmail.com> wrote:> On 7/30/07, linojon <linojon at gmail.com> wrote: > > Hi, > > > > My helper specs were going ok until I added a call to a rails > > DateHelper method in one of my helpers > > http://api.rubyonrails.com/classes/ActionView/Helpers/ > > DateHelper.html#M000574 > > > > The helper runs fine from my view templates, just dies in the spec test. > > > > I boiled my question down to a simple (not too useful) example. I''m > > not sure what I''m missing. > > > > # application_helper.rb > > module ApplicationHelper > > > > def app_foo > > t = Time.now > > distance_of_time_in_words( t, t + 50.minutes) > > return true > > end > > end > > > > # application_helper_spec.rb > > require File.dirname(__FILE__) + ''/../spec_helper'' > > > > describe ApplicationHelper do > > it "should find app_foo in application_helpers.rb" do > > app_foo.should be_true > > end > > end > > > > # error output > > NoMethodError in ''ApplicationHelper should find app_foo in > > application_helpers.rb'' > > undefined method `distance_of_time_in_words'' for [Dynamically > > generated class for RSpec example]:#<Class:0x32d11c8> > > Please put bug reports, feature requests, and patches here: > > http://rubyforge.org/tracker/index.php?group_id=797I went ahead and entered and fixed this: http://rubyforge.org/tracker/index.php?func=detail&aid=12714&group_id=797&atid=3149 Please do report bugs to the tracker, however. I am not always able to jump on things I see on this list. Cheers, David> > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > >
Jonathan Linowes
2007-Jul-31 16:14 UTC
[rspec-users] helper spec not finding rails core helpers
Thanks. I didnt know it was a bug. I thought I was doing something wrong. :) linoj On Jul 31, 2007, at 6:20 AM, David Chelimsky wrote:> On 7/31/07, David Chelimsky <dchelimsky at gmail.com> wrote: >> On 7/30/07, linojon <linojon at gmail.com> wrote: >>> Hi, >>> >>> My helper specs were going ok until I added a call to a rails >>> DateHelper method in one of my helpers >>> http://api.rubyonrails.com/classes/ActionView/Helpers/ >>> DateHelper.html#M000574 >>> >>> The helper runs fine from my view templates, just dies in the >>> spec test. >>> >>> I boiled my question down to a simple (not too useful) example. I''m >>> not sure what I''m missing. >>> >>> # application_helper.rb >>> module ApplicationHelper >>> >>> def app_foo >>> t = Time.now >>> distance_of_time_in_words( t, t + 50.minutes) >>> return true >>> end >>> end >>> >>> # application_helper_spec.rb >>> require File.dirname(__FILE__) + ''/../spec_helper'' >>> >>> describe ApplicationHelper do >>> it "should find app_foo in application_helpers.rb" do >>> app_foo.should be_true >>> end >>> end >>> >>> # error output >>> NoMethodError in ''ApplicationHelper should find app_foo in >>> application_helpers.rb'' >>> undefined method `distance_of_time_in_words'' for [Dynamically >>> generated class for RSpec example]:#<Class:0x32d11c8> >> >> Please put bug reports, feature requests, and patches here: >> >> http://rubyforge.org/tracker/index.php?group_id=797 > > I went ahead and entered and fixed this: > > http://rubyforge.org/tracker/index.php? > func=detail&aid=12714&group_id=797&atid=3149 > > Please do report bugs to the tracker, however. I am not always able to > jump on things I see on this list. > > Cheers, > David > >> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
I''ve been on CURRENT I tried to switch to trunk but its not completing. How do I install the trunk version? (for rails) (I apologize in advance for being clueless) Here''s my steps: First, I brought everything I have up to date: $ sudo gem update ZenTest $ sudo gem update rspec $ script/plugin update rspec $ script/plugin update rspec_on_rails and realized I''m on CURRENT, so I then did: $ rm -rf vendor/plugins/rspec $ rm -rf vendor/plugins/rspec_on_rails $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec_trunk ... Plugin not found: ["svn://rubyforge.org/var/svn/rspec/trunk", "rspec_trunk"] Unsure about that error, I then tried to build it $ cd vendor/plugins/rspec $ rake kept getting errors about missing gems, installed the gems and rake''d again until it told me to run: $ rake install_dependencies which does a bunch of stuff and then actually installs rails/1.2.2 under vendor/plugins/rspec/example_rails_app/vendor/rails/1.2.2/ and then also installs 1.2.3 ... and then also edge... UGH!! I stopped it before it finished, as i really dont want/need the sample app and rails versions
On 7/31/07, Jonathan Linowes <jonathan at parkerhill.com> wrote:> I''ve been on CURRENT > I tried to switch to trunk but its not completing. > How do I install the trunk version? (for rails) > > (I apologize in advance for being clueless) > > Here''s my steps: > > First, I brought everything I have up to date: > $ sudo gem update ZenTest > $ sudo gem update rspec > $ script/plugin update rspec > $ script/plugin update rspec_on_rails > > and realized I''m on CURRENT, so I then did: > > $ rm -rf vendor/plugins/rspec > $ rm -rf vendor/plugins/rspec_on_rails > $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk > rspec_trunkTry this: script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec> ... > Plugin not found: ["svn://rubyforge.org/var/svn/rspec/trunk", > "rspec_trunk"] > > Unsure about that error, I then tried to build it > > $ cd vendor/plugins/rspec > $ rake > > kept getting errors about missing gems, installed the gems and rake''d > again until it told me to run: > > $ rake install_dependencies > > which does a bunch of stuff and then actually installs rails/1.2.2 > under vendor/plugins/rspec/example_rails_app/vendor/rails/1.2.2/ > and then also installs 1.2.3 ... and then also edge... UGH!! > I stopped it before it finished, as i really dont want/need the > sample app and rails versions > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky wrote:> On 7/31/07, Jonathan Linowes <jonathan at parkerhill.com> wrote: >> I''ve been on CURRENT >> I tried to switch to trunk but its not completing. >> How do I install the trunk version? (for rails) >> >> (I apologize in advance for being clueless) >> >> Here''s my steps: >> >> First, I brought everything I have up to date: >> $ sudo gem update ZenTest >> $ sudo gem update rspec >> $ script/plugin update rspec >> $ script/plugin update rspec_on_rails >> >> and realized I''m on CURRENT, so I then did: >> >> $ rm -rf vendor/plugins/rspec >> $ rm -rf vendor/plugins/rspec_on_rails >> $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk >> rspec_trunk > > Try this: > > script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec >Might I take this opportunity to encourage you all to consider using piston for managing external dependencies within your repository. :-) http://piston.rubyforge.org/ http://rubyurl.com/qZi (article on using it) Cheers, Robby -- Robby Russell http://www.robbyonrails.com # my blog http://www.planetargon.com # my business http://www.programmingrails.com # my book
On 7/31/07, Robby Russell <robby.lists at planetargon.com> wrote:> David Chelimsky wrote: > > On 7/31/07, Jonathan Linowes <jonathan at parkerhill.com> wrote: > >> I''ve been on CURRENT > >> I tried to switch to trunk but its not completing. > >> How do I install the trunk version? (for rails) > >> > >> (I apologize in advance for being clueless) > >> > >> Here''s my steps: > >> > >> First, I brought everything I have up to date: > >> $ sudo gem update ZenTest > >> $ sudo gem update rspec > >> $ script/plugin update rspec > >> $ script/plugin update rspec_on_rails > >> > >> and realized I''m on CURRENT, so I then did: > >> > >> $ rm -rf vendor/plugins/rspec > >> $ rm -rf vendor/plugins/rspec_on_rails > >> $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk > >> rspec_trunk > > > > Try this: > > > > script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec > > > > Might I take this opportunity to encourage you all to consider using > piston for managing external dependencies within your repository. :-)Hear, hear!> > http://piston.rubyforge.org/ > http://rubyurl.com/qZi (article on using it) > > Cheers, > Robby > > > -- > Robby Russell > http://www.robbyonrails.com # my blog > http://www.planetargon.com # my business > http://www.programmingrails.com # my book > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Jonathan Linowes
2007-Aug-01 02:24 UTC
[rspec-users] helper spec not finding rails core helpers
I''m having trouble logging into RubyForge (might be my firewall, both firefox and safari are not taking its cookie). I wanted to add this comment to http://rubyforge.org/tracker/index.php? func=detail&aid=12714&group_id=797&atid=3149 ------------ The pagination helper has been removed from rails edge. To avoid a runtime error I commented out line 33 in rspec_on_rails/lib/rails/dsl/ behavior/helper.rb # include ActionView::Helpers::PaginationHelper On Jul 31, 2007, at 6:20 AM, David Chelimsky wrote:> On 7/31/07, David Chelimsky <dchelimsky at gmail.com> wrote: >> On 7/30/07, linojon <linojon at gmail.com> wrote: >>> Hi, >>> >>> My helper specs were going ok until I added a call to a rails >>> DateHelper method in one of my helpers >>> http://api.rubyonrails.com/classes/ActionView/Helpers/ >>> DateHelper.html#M000574 >>> >>> The helper runs fine from my view templates, just dies in the >>> spec test. >>> >>> I boiled my question down to a simple (not too useful) example. I''m >>> not sure what I''m missing. >>> >>> # application_helper.rb >>> module ApplicationHelper >>> >>> def app_foo >>> t = Time.now >>> distance_of_time_in_words( t, t + 50.minutes) >>> return true >>> end >>> end >>> >>> # application_helper_spec.rb >>> require File.dirname(__FILE__) + ''/../spec_helper'' >>> >>> describe ApplicationHelper do >>> it "should find app_foo in application_helpers.rb" do >>> app_foo.should be_true >>> end >>> end >>> >>> # error output >>> NoMethodError in ''ApplicationHelper should find app_foo in >>> application_helpers.rb'' >>> undefined method `distance_of_time_in_words'' for [Dynamically >>> generated class for RSpec example]:#<Class:0x32d11c8> >> >> Please put bug reports, feature requests, and patches here: >> >> http://rubyforge.org/tracker/index.php?group_id=797 > > I went ahead and entered and fixed this: > > http://rubyforge.org/tracker/index.php? > func=detail&aid=12714&group_id=797&atid=3149 > > Please do report bugs to the tracker, however. I am not always able to > jump on things I see on this list. > > Cheers, > David > >> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Jonathan Linowes
2007-Aug-01 02:48 UTC
[rspec-users] installing trunk (was: upgrading from CURRENT to trunk)
Hi, I must be missing something obvious. $ rm -rf vendor/plugins/rspec $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec Exported revision 2188. Plugin not found: ["svn://rubyforge.org/var/svn/rspec/trunk", "rspec"] $ ls vendor/plugins rspec/ (etc) $ ls vendor/plugins/rspec README Rakefile example_rails_app/ rspec/ spec_distributed/ RSpec.tmbundle/ doc/ pre_commit/ rspec_on_rails/ spec_ui/ but if i manually shuffle things around, then i''m ok: $ mv vendor/plugins/rspec ~/ $ mv ~/rspec/rspec vendor/plugins/ $ mv ~/rspec/rspec_on_rails vendor/plugins/ this works Probably a script or svn thing I''m doing wrong?
David Chelimsky
2007-Aug-01 03:15 UTC
[rspec-users] installing trunk (was: upgrading from CURRENT to trunk)
On 7/31/07, Jonathan Linowes <jonathan at parkerhill.com> wrote:> > Hi, I must be missing something obvious. > > $ rm -rf vendor/plugins/rspec > > $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec > Exported revision 2188. > Plugin not found: ["svn://rubyforge.org/var/svn/rspec/trunk", "rspec"] > > $ ls vendor/plugins > rspec/ (etc) > > $ ls vendor/plugins/rspec > README Rakefile > example_rails_app/ rspec/ spec_distributed/ > RSpec.tmbundle/ doc/ > pre_commit/ rspec_on_rails/ spec_ui/ > > > but if i manually shuffle things around, then i''m ok: > > $ mv vendor/plugins/rspec ~/ > $ mv ~/rspec/rspec vendor/plugins/ > $ mv ~/rspec/rspec_on_rails vendor/plugins/ > > this works > > Probably a script or svn thing I''m doing wrong?Sorry - I typed it wrong. See http://rspec.rubyforge.org/documentation/rails/install.html. Instructions for trunk are further down the page. David> _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Jonathan Linowes
2007-Aug-01 03:33 UTC
[rspec-users] installing trunk (was: upgrading from CURRENT to trunk)
dang, I was looking at "Home >> Install" http://rspec.rubyforge.org/download.html and obviously missed that link Thank you and sorry to be a bother On Jul 31, 2007, at 11:15 PM, David Chelimsky wrote:> > Sorry - I typed it wrong. See > http://rspec.rubyforge.org/documentation/rails/install.html. > Instructions for trunk are further down the page. > > David > >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users