diff options
author | José Valim <jose.valim@gmail.com> | 2011-07-25 08:13:21 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-07-25 08:13:21 -0700 |
commit | b033a248146d53c65a1680cdeb76b2035e670dfd (patch) | |
tree | c1b1eff3f1547143574b1e2f064d619783e031a5 /actionpack/test/template | |
parent | 64affc9384e9e8845b0204b94c003265442bc3e2 (diff) | |
parent | 624b11861658478e9dcd75728f4f3e9d91e8c03d (diff) | |
download | rails-b033a248146d53c65a1680cdeb76b2035e670dfd.tar.gz rails-b033a248146d53c65a1680cdeb76b2035e670dfd.tar.bz2 rails-b033a248146d53c65a1680cdeb76b2035e670dfd.zip |
Merge pull request #2258 from thedarkone/no-file-stat
Use shorter class-level File methods instead of going through File.stat
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index e88a3591d8..d93433deac 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -481,7 +481,7 @@ class AssetTagHelperTest < ActionView::TestCase end def test_timebased_asset_id - expected_time = File.stat(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).mtime.to_i.to_s + expected_time = File.mtime(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).to_i.to_s assert_equal %(<img alt="Rails" src="/images/rails.png?#{expected_time}" />), image_tag("rails.png") end @@ -512,7 +512,7 @@ class AssetTagHelperTest < ActionView::TestCase def test_timebased_asset_id_with_relative_url_root @controller.config.relative_url_root = "/collaboration/hieraki" - expected_time = File.stat(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).mtime.to_i.to_s + expected_time = File.mtime(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).to_i.to_s assert_equal %(<img alt="Rails" src="#{@controller.config.relative_url_root}/images/rails.png?#{expected_time}" />), image_tag("rails.png") end |