0

I have the same problem as follows:

In "support/env.rb":

module CapybaraApp
  def app; Capybara.app; end
end
World(CapybaraApp)
World(Rack::Test::Methods)

In "step_definitions/restUtils.rb":

Quando /^Send POST request to "([^\"]*)" with:$/ do |url, body|
  header 'Accept', 'application/json'
  header 'Content-Type', 'application/json'
  post url, body
end

Result: undefined method 'call' for nil:NilClass (NoMethodError)

Obs.: ruby 2.0.0p645 (2015-04-13) [x64-mingw32] Cucumber 2.0.2

@Elye, can you help me? What are the alternatives to tests using REST? Regards!

0 Answers0