Skip to content

Commit

Permalink
Get travis passing on jruby 1.8 and 1.9
Browse files Browse the repository at this point in the history
Had to use open() instead of IO.read so that I could pass
the binary flag.
  • Loading branch information
atambo committed Jan 7, 2013
1 parent f464156 commit 5dfcd67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- jruby
- jruby-18mode
- jruby-19mode
- rbx
- ree
script: "bundle exec rake test features"
2 changes: 1 addition & 1 deletion features/step_definitions/command_line_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@

Then /^the image ([^ ]+) has a size of (\d+)x(\d+)$/ do |file, width, height|
# see http:https://snippets.dzone.com/posts/show/805
IO.read(file)[0x10..0x18].unpack('NN').should == [width.to_i, height.to_i]
open(file, "rb").read[0x10..0x18].unpack('NN').should == [width.to_i, height.to_i]
end

Then /^I should see the following lines of output:$/ do |table|
Expand Down
2 changes: 1 addition & 1 deletion test/integrations/sprites_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def map_files(glob)
end

def image_size(file)
IO.read(map_location(file))[0x10..0x18].unpack('NN')
open(map_location(file), "rb").read[0x10..0x18].unpack('NN')
end

def image_md5(file)
Expand Down

0 comments on commit 5dfcd67

Please sign in to comment.