summary refs log tree commit
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-30 17:28:53 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-31 12:15:31 -0800
commit67db0ec667b379a412898d83596e761e25563e82 (patch)
tree1fcb662538552f279f40833a1ff62001679024e5
parentc6805fb93da30e0056b38e0fa6015c3d1bca5876 (diff)
downloadrack-mri-1.9.2dev.tar.gz
make Rack::Session::Cookie spec immune to Marshal changes mri-1.9.2dev
Various versions/implementations of Ruby may Marshal data
differently.  Instead of relying on a fragile test that
relies on exact byte sequence matches, just rely on existing
round-trip tests for the cookies.
-rw-r--r--test/spec_rack_session_cookie.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/spec_rack_session_cookie.rb b/test/spec_rack_session_cookie.rb
index 3be88b43..a1647894 100644
--- a/test/spec_rack_session_cookie.rb
+++ b/test/spec_rack_session_cookie.rb
@@ -49,11 +49,7 @@ context "Rack::Session::Cookie" do
   
   specify "creates a new cookie with integrity hash" do
     res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')).get("/")
-    if RUBY_VERSION < "1.9"
-      res["Set-Cookie"].should.match("rack.session=BAh7BiIMY291bnRlcmkG%0A--1439b4d37b9d4b04c603848382f712d6fcd31088")
-    else
-      res["Set-Cookie"].should.match("rack.session=BAh7BkkiDGNvdW50ZXIGOg1lbmNvZGluZyINVVMtQVNDSUlpBg%3D%3D%0A--d7a6637b94d2728194a96c18484e1f7ed9074a83")
-    end
+    res["Set-Cookie"].should.match("rack.session=")
   end
   
   specify "loads from a cookie wih integrity hash" do