title: Cucumber: Undefined step although the step is defined(Ruby)
body: <p>I  am trying to make a simple test case with feature file scenario:</p>
  
  <pre><code>Feature: Amazon Search Functionality
  
  Scenario: Users can search for a specific item on Amazon
      Given a user goes to Amazon
      When they search for "pens"
      Then amazon should return results for "pens"
  </code></pre>
  
  <p>Ruby code for step definition is:</p>
  
  <pre><code>require 'watir-webdriver'
  require 'cucumber'
  
  Given(/^a user goes to Amazon$/) do
    @browser= Selenium::WebDriver::Chrome::Profile.new
    @browser.goto "http://www.amazon.com"
  end
  
  When(/^they search for "([^"]*)"$/) do |arg|
    @browser.text_field(:id=&gt; "twotabsearchtextbox").set "#{arg}"
    @browser.send_keys: return
  end
  
  Then(/^amazon should return results for "([^"]*)"$/) do |arg|
    @browser.div(:id=&gt;"result_2").wait_untill_present
    page_output = @browser.div(:id=&gt; "resultsCol").text.include? "#{arg}"
    assert (page_output=true)
    @browser.close
  
  end
  </code></pre>
  
  <p>I am getting output:
  Testing started at 3:49 AM</p>
  
  <pre><code>C:\Ruby24-x64\bin\ruby.exe -EUTF-8 C:\Ruby24-x64\bin\cucumber C:/Users/rahulpathak01/Desktop/automatedtest/Features/Amazon_search.feature --format Teamcity::Cucumber::Formatter --expand --color -r features
  WARNING: The formatter Teamcity::Cucumber::Formatter is using the deprecated formatter API which will be removed in v4.0 of Cucumber.
  
  You can implement step definitions for undefined steps with these snippets:
  
  Given("a user goes to Amazon") do
    pending # Write code here that turns the phrase above into concrete actions
  end
  
  
  You can implement step definitions for undefined steps with these snippets:
  
  When("they search for {string}") do |string|
    pending # Write code here that turns the phrase above into concrete actions
  end
  
  
  You can implement step definitions for undefined steps with these snippets:
  
  Then("amazon should return results for {string}") do |string|
    pending # Write code here that turns the phrase above into concrete actions
  end
  1 scenario (1 undefined)
  3 steps (3 undefined)
  0m0.019s
  </code></pre>
  
  <p>My folder structure is correct still rubymine is unable to find step definitions. </p>
  
  <p>Folder structure:</p>
  
  <pre><code>Features
     Step Definitions
          test.rb
     testfeatures.feature
  </code></pre>