Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method 'header' #41

Open
mzeyen opened this issue Nov 6, 2015 · 1 comment
Open

undefined method 'header' #41

mzeyen opened this issue Nov 6, 2015 · 1 comment

Comments

@mzeyen
Copy link

mzeyen commented Nov 6, 2015

Hi everyone,
i am quite new to cucumber and testing REST API´s. But i have the following problem.

I installed the latest version of cucumber-api-steps (v0.13) and when i run a feature file i get the error mentioned above in the GIVEN step.

"undefined method 'header'

My feature file looks l ike this:

Feature: API

Scenario: list all products
Given I send and accept JSON
When I send a GET request to "any URL"
Then the response should be "200"

I followed the installation steps in the Readme file,
I am using ruby 2.2.0.

@dpavkov
Copy link

dpavkov commented Jan 27, 2016

Header is rake-test method, so you have to include it, probably to env.rb:

require 'rack/test'
World(Rack::Test::Methods)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants