Skip to content

Commit

Permalink
Fix the test suite to not rely on Base64.urlsafe_encode64
Browse files Browse the repository at this point in the history
  • Loading branch information
jcn committed Feb 27, 2013
1 parent 21a8145 commit c2a228c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/requests/magickly_app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def setup_image(host='http://www.foo.com')
setup_image
width = 100

encoded = Base64.urlsafe_encode64 "src/#{@escaped_image_url}/resize/#{width}x"
# This is just Base64.urlsafe_encode64 which is not available in ruby 1.8.7
encoded = ["src/#{@escaped_image_url}/resize/#{width}x"].pack("m0").tr("+/", "-_")

get "/qe/#{encoded}"

Expand Down

0 comments on commit c2a228c

Please sign in to comment.