I added cucumber to my rails project using the following commands: git submodule add git://github.com/aslakhellesoy/cucumber.git \ vendor/plugins/cucumber ruby script/generate cucumber git submodule add git://github.com/brynary/webrat.git \ vendor/plugins/webrat git submodule add git://github.com/dchelimsky/rspec.git \ vendor/plugins/rspec git submodule add git://github.com/dchelimsky/rspec-rails.git \ vendor/plugins/rspec-rails script/generate rspec I create a feature that used steps that included visits. I got the following error: /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'': no such file to load -- webrat (LoadError) This occurred at line 4 in webrat_steps.rb So I commented out that line and added "require ''webrat''" to env.rb This time I got the following error: undefined method `visits'' for #<ActionController::Integration::Session:0x7f3d871693d0> (NoMethodError) So I had to change the require in env.rb to require ''webrat/rails'' It worked but I got the following deprecation errors: visits is deprecated. Use visit instead. fills_in is deprecated. Use fill_in instead. clicks_button is deprecated. Use click_button instead. I changed these in my steps file, and it worked fine. The problem with requiring webrat from webrat_steps, is that when this line is executed, the $LOAD_PATHS has not been modified to include the plugin lib directories. That is done by support/env.rb. The rake task "features" creates a command line that looks like: -I "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/lib" "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/bin/cucumber" --format pretty --require features/step_definitions/user_steps.rb --require features/step_definitions/webrat_steps.rb --require features/step_definitions/frooble_steps.rb --require features/support/env.rb features/manage_users.feature "support/env.rb" is required after "step_definitions/webrat_steps.rb". this should probably be changed. -- Posted via http://www.ruby-forum.com/.
On Tue, Dec 2, 2008 at 4:25 PM, Stephen Veit <lists at ruby-forum.com> wrote:> I added cucumber to my rails project using the following commands: > > git submodule add git://github.com/aslakhellesoy/cucumber.git \ > vendor/plugins/cucumber > ruby script/generate cucumber > git submodule add git://github.com/brynary/webrat.git \ > vendor/plugins/webrat > git submodule add git://github.com/dchelimsky/rspec.git \ > vendor/plugins/rspec > git submodule add git://github.com/dchelimsky/rspec-rails.git \ > vendor/plugins/rspec-rails > script/generate rspec > > I create a feature that used steps that included visits. I got the > following error: > > /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'': no such file to load -- webrat (LoadError) > > This occurred at line 4 in webrat_steps.rb > > So I commented out that line and added "require ''webrat''" to env.rb > > This time I got the following error: > > undefined method `visits'' for > #<ActionController::Integration::Session:0x7f3d871693d0> (NoMethodError) > > So I had to change the require in env.rb to > > require ''webrat/rails'' > > It worked but I got the following deprecation errors: > > visits is deprecated. Use visit instead. > fills_in is deprecated. Use fill_in instead. > clicks_button is deprecated. Use click_button instead. > > I changed these in my steps file, and it worked fine. > >I just (1 hour ago) incorporated some recent Cucumber changes from Bryan (who writes Webrat) and released cucumber 0.1.11. Can you try with the latest release? It should work well with Bryan''s latest webrat. Cheers, Aslak> > > The problem with requiring webrat from webrat_steps, is that when this > line is executed, the $LOAD_PATHS has not been modified to include the > plugin lib directories. That is done by support/env.rb. The rake task > "features" creates a command line that looks like: > > -I > "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/lib" > > "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/bin/cucumber" > --format pretty --require features/step_definitions/user_steps.rb > --require features/step_definitions/webrat_steps.rb --require > features/step_definitions/frooble_steps.rb --require > features/support/env.rb features/manage_users.feature > > "support/env.rb" is required after "step_definitions/webrat_steps.rb". > this should probably be changed. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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/20081202/520ea268/attachment.html>
On Dec 2, 2008, at 10:42 AM, aslak hellesoy wrote:> On Tue, Dec 2, 2008 at 4:25 PM, Stephen Veit <lists at ruby-forum.com> > wrote: > I added cucumber to my rails project using the following commands: > > git submodule add git://github.com/aslakhellesoy/cucumber.git \ > vendor/plugins/cucumber > ruby script/generate cucumber > git submodule add git://github.com/brynary/webrat.git \ > vendor/plugins/webrat > git submodule add git://github.com/dchelimsky/rspec.git \ > vendor/plugins/rspec > git submodule add git://github.com/dchelimsky/rspec-rails.git \ > vendor/plugins/rspec-rails > script/generate rspec > > I create a feature that used steps that included visits. I got the > following error: > > /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'': no such file to load -- webrat (LoadError) > > This occurred at line 4 in webrat_steps.rb > > So I commented out that line and added "require ''webrat''" to env.rb > > This time I got the following error: > > undefined method `visits'' for > #<ActionController::Integration::Session:0x7f3d871693d0> > (NoMethodError) > > So I had to change the require in env.rb to > > require ''webrat/rails'' > > It worked but I got the following deprecation errors: > > visits is deprecated. Use visit instead. > fills_in is deprecated. Use fill_in instead. > clicks_button is deprecated. Use click_button instead. > > I changed these in my steps file, and it worked fine. > > > I just (1 hour ago) incorporated some recent Cucumber changes from > Bryan (who writes Webrat) and released cucumber 0.1.11. > Can you try with the latest release? It should work well with > Bryan''s latest webrat.I had the same problem. The fix was to install Webrat as a plugin. I''ll try out the updated versions.> > > Cheers, > Aslak > > > > The problem with requiring webrat from webrat_steps, is that when this > line is executed, the $LOAD_PATHS has not been modified to include the > plugin lib directories. That is done by support/env.rb. The rake task > "features" creates a command line that looks like: > > -I > "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/lib" > "/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/ > bin/cucumber" > --format pretty --require features/step_definitions/user_steps.rb > --require features/step_definitions/webrat_steps.rb --require > features/step_definitions/frooble_steps.rb --require > features/support/env.rb features/manage_users.feature > > "support/env.rb" is required after "step_definitions/webrat_steps.rb". > this should probably be changed.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081202/a07b30b0/attachment.html>
Jim Gay wrote:> On Dec 2, 2008, at 10:42 AM, aslak hellesoy wrote: >> vendor/plugins/rspec >> This occurred at line 4 in webrat_steps.rb >> >> >> I just (1 hour ago) incorporated some recent Cucumber changes from >> Bryan (who writes Webrat) and released cucumber 0.1.11. >> Can you try with the latest release? It should work well with >> Bryan''s latest webrat. > > I had the same problem. The fix was to install Webrat as a plugin. > I''ll try out the updated versions.I tried with the latest plugins from GitHub for Cucumber and Webrat. It worked fine. Thanks. -- Posted via http://www.ruby-forum.com/.
But doesn''t work with the webrat gem 2008/12/4 Stephen Veit <lists at ruby-forum.com>> Jim Gay wrote: > > On Dec 2, 2008, at 10:42 AM, aslak hellesoy wrote: > >> vendor/plugins/rspec > >> This occurred at line 4 in webrat_steps.rb > >> > >> > >> I just (1 hour ago) incorporated some recent Cucumber changes from > >> Bryan (who writes Webrat) and released cucumber 0.1.11. > >> Can you try with the latest release? It should work well with > >> Bryan''s latest webrat. > > > > I had the same problem. The fix was to install Webrat as a plugin. > > I''ll try out the updated versions. > > I tried with the latest plugins from GitHub for Cucumber and Webrat. It > worked fine. Thanks. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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/20081204/c9908cbb/attachment.html>
Possibly Parallel Threads
- Oddness with fieldnames containing an underscore
- Sinitra 0.9.1 Webrat 0.4.2 Cuc problem
- response.should have_content("1 movie") does not seem to work for me
- [Cucumber 0.2] Failure to use should
- tips on how to write a controller test for models associated with currently logged in user