Created
September 15, 2011 15:31
-
-
Save aaronjensen/1219565 to your computer and use it in GitHub Desktop.
testing cookie deletes in rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe MyController do | |
let(:cookies) { mock('cookies') } | |
context "when my page is visited" do | |
it "should delete my cookie" do | |
controller.stub!(:cookies).and_return(cookies) | |
cookies.should_receive(:delete).with(cookie, :domain => '.mydomain.com') | |
get "my_action" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment