Skip to content

Commit

Permalink
Use rack-test's set_cookie method instead of header('cookie'm ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Melia and Joey Aghion committed May 28, 2010
1 parent 3e982e7 commit 80b87a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion spec/rack/toolbar_spec.rb
Expand Up @@ -82,7 +82,8 @@

it "inserts the Rack::Bug toolbar when the password matches" do
sha = "545049d1c5e2a6e0dfefd37f9a9e0beb95241935"
response = get "/", {}, :cookie => ["rack_bug_enabled=1", "rack_bug_password=#{sha}"]
set_cookie ["rack_bug_enabled=1", "rack_bug_password=#{sha}"]
response = get "/"
response.should have_selector("div#rack_bug")
end

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -38,7 +38,7 @@ class Base
Rack::Bug.enable

# Set the cookie that triggers Rack::Bug under normal conditions
header 'cookie', "rack_bug_enabled=1"
set_cookie "rack_bug_enabled=1"
end

def app
Expand Down

0 comments on commit 80b87a2

Please sign in to comment.