title: How to call a Method in a Cucumber - Step Definition
body: <p>I’m a newbie to Cucumber framework. I’m trying to call a Ruby method inside of a step definition. Here is how I define my method in lib/methods.rb</p>
  
  <pre><code>class Test_class
  
    def create_test_scenario()
     puts "here!!!"
    end
  
  end
  </code></pre>
  
  <p>This is how I try to call the method inside of a step definition:</p>
  
  <pre><code> And(/^I create scenarios$/) do
     Test_class.create_test_scenario
   end
  </code></pre>
  
  <p>I'm getting 'uninitialized constant Test_class (NameError)' when I run the test. Any ideas? Thanks.</p>