Why are all response bodies after the first blank in Cucumber?
- by James A. Rosen
I'm using Cucumber (0.6.3), Cucumber-Rails (0.3.0), Webrat (0.7.0), and Rails (2.3.5) for some tests. The following scenario passes just fine:
Scenario: load one page
Given I am on the home page
Then I should see "Welcome"
The following, however, fails:
Scenario: load two pages
Given I am on the FAQ pag
When I go to the home page
Then I should see "Welcome"
The problem is that the second @response.body is blank. I added a Rack middleware to get a little more information:
class LogEachRequest
def initialize(app); @app = app; @count = 0; end
def call(env)
puts "Processing request # #{@count += 1)"
@app.call(env)
end
end
It shows me only one request processed. That is, it only ever prints out
Processing request # 1