Hi I ran in this issue a while ago...
authlogic flash[:notice] does not show up in cucumber w开发者_JAVA技巧ebrat step
And it looks like it still exisits in rails 3 this was a suggested fix.
class RackRailsCookieHeaderHack
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
if headers['Set-Cookie'] && headers['Set-Cookie'].respond_to?(:collect!)
headers['Set-Cookie'].collect! { |h| h.strip }
end
[status, headers, body]
end
end
config.after_initialize do
ActionController::Dispatcher.middleware.insert_before(ActionController::Base.session_store, RackRailsCookieHeaderHack)
end
this fixed the issue with 2.3.8... I had to place it in the config/environment/cucumber.rb
but in Rails 3 this file is not available anymore and in config/environment/test.rb I cannot inject something in the middleware
according the lighthouse bugtracker this should be fixed... can someone confirm that this problem still exists with Rails 3? Any help would be great?
Ok, found a solution.
I replaced webrat with capybara and everything is good.
精彩评论