Note that there are some explanatory texts on larger screens.

plurals
  1. POCucumber + Spork = undefined method `visit' for #<Object:0x82fcc588> (NoMethodError)?
    primarykey
    data
    text
    <p>I'm tearing my hair out here. When running Cucumber in Spork-compatible mode (--drb) the <strong>visit()</strong> method doesn't work.</p> <p>Simply trying the feature step:</p> <pre><code>When I go to the home page </code></pre> <p>calls web step:</p> <pre><code>When /^(?:|I )go to (.+)$/ do |page_name| visit path_to(page_name) end </code></pre> <p>Running "cucumber" on the command line produces the following error:</p> <pre><code>% cucumber Using the default profile... Disabling profiles... .F-- (::) failed steps (::) undefined method `visit' for #&lt;Object:0x82fcc588&gt; (NoMethodError) ./features/step_definitions/web_steps.rb:24:in `/^(?:|I )go to (.+)$/' features/authenticated/home_page_visit.feature:10:in `When I go to the home page' Failing Scenarios: cucumber features/authenticated/home_page_visit.feature:7 # Scenario: Visit the home page </code></pre> <p><em>Does anyone have an idea why visit() would not be available?</em></p> <hr /> <p><strong>My environment:</strong></p> <p>I'm using Rails 2.3.9 and just installed cucumber-rails (0.3.2), cucumber (0.9.2), capybara (0.3.9), and spork (0.8.4). What's interesting is if I don't use Spork then this works absolutely fine:</p> <pre><code>% cucumber Using the default profile... ... 1 scenario (1 passed) 3 steps (3 passed) 0m0.114s </code></pre> <p><strong>Another intersting data point:</strong></p> <p>I did a little debugging and deep within the Cucumber gem itself (inside cucumber-0.9.2/lib/cucumber/core_ext/instance_exec.rb) I put in a <strong>puts()</strong> to dump out what <strong>self.class.name</strong> was to <em>stdout</em>, and when I ran with Spork it spit out "Object" but when I ran it without Spork it printed "Cucumber::Rails::World".</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload