Why are all response bodies after the first blank in Cucumber?
Posted
by James A. Rosen
on Stack Overflow
See other posts from Stack Overflow
or by James A. Rosen
Published on 2010-03-15T22:36:09Z
Indexed on
2010/03/15
22:39 UTC
Read the original article
Hit count: 270
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
© Stack Overflow or respective owner