Encoding is unnecessary and allow tests to pass in Ruby 1.8

This commit is contained in:
Erik Michaels-Ober 2012-03-12 19:02:43 -05:00
parent 35e6f80277
commit 474ea03281
1 changed files with 2 additions and 4 deletions

View File

@ -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])