From 474ea032818608573e06909bfb842d578a195737 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Mon, 12 Mar 2012 19:02:43 -0500 Subject: [PATCH] Encoding is unnecessary and allow tests to pass in Ruby 1.8 --- test_app/spec/controllers/impressionist_uniqueness_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test_app/spec/controllers/impressionist_uniqueness_spec.rb b/test_app/spec/controllers/impressionist_uniqueness_spec.rb index 5557ef3..f9c3fc3 100644 --- a/test_app/spec/controllers/impressionist_uniqueness_spec.rb +++ b/test_app/spec/controllers/impressionist_uniqueness_spec.rb @@ -16,8 +16,7 @@ describe DummyController do end it "should recognize unique session" do - # the following line was necessary as session hash returned a binary string (ASCII-8BIT encoded) - controller.stub!(:session_hash).and_return(request.session_options[:id].encode("ISO-8859-1")) + controller.stub!(:session_hash).and_return(request.session_options[:id]) controller.impressionist_subapp_filter(nil, [:session_hash]) controller.impressionist_subapp_filter(nil, [:session_hash]) Impression.should have(@impression_count + 1).records @@ -190,8 +189,7 @@ describe DummyController do end it "should recognize unique session" do - # the following line was necessary as session hash returned a binary string (ASCII-8BIT encoded) - controller.stub!(:session_hash).and_return(request.session_options[:id].encode("ISO-8859-1")) + controller.stub!(:session_hash).and_return(request.session_options[:id]) impressionable = Post.create controller.impressionist(impressionable, nil, :unique => [:session_hash]) controller.impressionist(impressionable, nil, :unique => [:session_hash])