我有同样的问题如下:
在“支持/env.rb”中:
module CapybaraApp
def app; Capybara.app; end
end
World(CapybaraApp)
World(Rack::Test::Methods)
在“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
结果:nil:NilClass (NoMethodError) 的未定义方法“调用”
观察:红宝石2.0.0p645(2015-04-13)[x64-mingw32]黄瓜2.0.2
@Elye,你能帮帮我吗?使用 REST 进行测试的替代方法是什么?问候!