Skip to content

Commit

Permalink
Fix unused data var warning
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Jan 10, 2012
1 parent 524abe2 commit abd40d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def setup
test "read static BINARY asset" do
data = @env['binary.png'].to_s
assert_equal "\x89PNG\r\n\x1A\n\x00\x00\x00".force_encoding("BINARY"),
@env['binary.png'].to_s[0..10]
data[0..10]
assert_equal Encoding.find('BINARY'), data.encoding
end

test "read processed BINARY asset" do
@env.register_postprocessor('image/png', :noop_processor) { |context, data| data }
data = @env['binary.png'].to_s
assert_equal "\x89PNG\r\n\x1A\n\x00\x00\x00".force_encoding("BINARY"),
@env['binary.png'].to_s[0..10]
data[0..10]
assert_equal Encoding.find('BINARY'), data.encoding
end
else
Expand Down Expand Up @@ -79,13 +79,13 @@ def setup

test "read static BINARY asset" do
data = @env['binary.png'].to_s
assert_equal "\x89PNG\r\n\x1A\n\x00\x00\x00", @env['binary.png'].to_s[0..10]
assert_equal "\x89PNG\r\n\x1A\n\x00\x00\x00", data[0..10]
end

test "read processed BINARY asset" do
@env.register_postprocessor('image/png', :noop_processor) { |context, data| data }
data = @env['binary.png'].to_s
assert_equal "\x89PNG\r\n\x1A\n\x00\x00\x00", @env['binary.png'].to_s[0..10]
assert_equal "\x89PNG\r\n\x1A\n\x00\x00\x00", data[0..10]
end
end
end

0 comments on commit abd40d9

Please sign in to comment.