test/test.rb in fastimage_inline-1.0.3 vs test/test.rb in fastimage_inline-1.0.4

- old
+ new

@@ -15,11 +15,11 @@ require File.join(PathHere, 'config', 'environment') require File.join(PathHere, "..", "lib", 'fastimage_inline') -require 'test_help' +require 'rails/test_help' class InlineTests < ActionController::TestCase def setup @controller = MainController.new @request = ActionController::TestRequest.new @@ -33,23 +33,23 @@ test "normal image tags are unaffected by browser version" do @request.env['HTTP_USER_AGENT'] = "msie 7" get "index" assert_response :success - assert_select "img#i1[src=?]", %r{/images/bg.png\?\d+} + assert_select "img#i1[src=?]", %r{/assets/bg.png} @request.env['HTTP_USER_AGENT'] = "msie 8" get "index" assert_response :success - assert_select "img#i1[src=?]", %r{/images/bg.png\?\d+} + assert_select "img#i1[src=?]", %r{/assets/bg.png} end test "inline image tags are rendered as normal tags if browser is not recognised" do @request.env['HTTP_USER_AGENT'] = "rails test" get "index" assert_response :success - assert_select "img#i2[src=?]", %r{/images/bg.png\?\d+} - assert_select "img#i3[src=?]", %r{/images/bullet.gif\?\d+} - assert_select "img#i4[src=?]", %r{/images/flag.jpg\?\d+} + assert_select "img#i2[src=?]", %r{/images/bg.png} + assert_select "img#i3[src=?]", %r{/images/bullet.gif} + assert_select "img#i4[src=?]", %r{/images/flag.jpg} end test "inline images are rendered inline for ie 8" do @request.env['HTTP_USER_AGENT'] = "msie 8" get "index"