<br><br><div class="gmail_quote">On Tue, Dec 2, 2008 at 4:25 PM, Stephen Veit <span dir="ltr">&lt;<a href="mailto:lists@ruby-forum.com">lists@ruby-forum.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I added cucumber to my rails project using the following commands:<br>
<br>
git submodule add git://<a href="http://github.com/aslakhellesoy/cucumber.git" target="_blank">github.com/aslakhellesoy/cucumber.git</a> \<br>
 &nbsp;vendor/plugins/cucumber<br>
ruby script/generate cucumber<br>
git submodule add git://<a href="http://github.com/brynary/webrat.git" target="_blank">github.com/brynary/webrat.git</a> \<br>
 &nbsp;vendor/plugins/webrat<br>
git submodule add git://<a href="http://github.com/dchelimsky/rspec.git" target="_blank">github.com/dchelimsky/rspec.git</a> \<br>
 &nbsp;vendor/plugins/rspec<br>
git submodule add git://<a href="http://github.com/dchelimsky/rspec-rails.git" target="_blank">github.com/dchelimsky/rspec-rails.git</a> \<br>
 &nbsp;vendor/plugins/rspec-rails<br>
script/generate rspec<br>
<br>
I create a feature that used steps that included visits. I got the<br>
following error:<br>
<br>
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in<br>
`gem_original_require&#39;: no such file to load -- webrat (LoadError)<br>
<br>
This occurred at line 4 in webrat_steps.rb<br>
<br>
So I commented out that line and added &quot;require &#39;webrat&#39;&quot; to env.rb<br>
<br>
This time I got the following error:<br>
<br>
undefined method `visits&#39; for<br>
#&lt;ActionController::Integration::Session:0x7f3d871693d0&gt; (NoMethodError)<br>
<br>
So I had to change the require in env.rb to<br>
<br>
require &#39;webrat/rails&#39;<br>
<br>
It worked but I got the following deprecation errors:<br>
<br>
visits is deprecated. Use visit instead.<br>
fills_in is deprecated. Use fill_in instead.<br>
clicks_button is deprecated. Use click_button instead.<br>
<br>
I changed these in my steps file, and it worked fine.<br>
<br>
</blockquote><div><br>I just (1 hour ago) incorporated some recent Cucumber changes from Bryan (who writes Webrat) and released cucumber <a href="http://0.1.11.">0.1.11.</a><br>Can you try with the latest release? It should work well with Bryan&#39;s latest webrat.<br>
<br>Cheers,<br>Aslak<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
The problem with requiring webrat from webrat_steps, is that when this<br>
line is executed, the $LOAD_PATHS has not been modified to include the<br>
plugin lib directories. That is done by support/env.rb. The rake task<br>
&quot;features&quot; creates a command line that looks like:<br>
<br>
-I<br>
&quot;/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/lib&quot;<br>
&quot;/home/sveit/Projects/rails/varsitytutors/vendor/plugins/cucumber/bin/cucumber&quot;<br>
--format pretty --require features/step_definitions/user_steps.rb<br>
--require features/step_definitions/webrat_steps.rb --require<br>
features/step_definitions/frooble_steps.rb --require<br>
features/support/env.rb features/manage_users.feature<br>
<br>
&quot;support/env.rb&quot; is required after &quot;step_definitions/webrat_steps.rb&quot;.<br>
this should probably be changed.<br>
<font color="#888888">--<br>
Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
_______________________________________________<br>
rspec-users mailing list<br>
<a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>
</font></blockquote></div><br>