Capybara & Cucumber | Getting cookies
问题 I'm trying to get cookie values in the Cucumber step: Step definitions When /^I log in$/ do # code to log in end Then /^cookies should be set$/ do cookies[:author].should_not be_nil end Controller class SessionsController < ApplicationController def create cookies[:author] = 'me' redirect_to authors_path end end But it doesn't work: Result expected: not nil got: nil In the RSpec examples, all works just fine: Controller Spec require 'spec_helper' describe SessionsController do describe