diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-16 16:37:56 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-16 16:41:01 +0100 |
commit | 590239156714c03ad525b2248a11a3f34da3aa6a (patch) | |
tree | 4ef57a5fae520d2177c850659b0497d709154bc9 /railties/test/application | |
parent | 4dd985ae9514fdb9688eab780d881decff8358fa (diff) | |
download | rails-590239156714c03ad525b2248a11a3f34da3aa6a.tar.gz rails-590239156714c03ad525b2248a11a3f34da3aa6a.tar.bz2 rails-590239156714c03ad525b2248a11a3f34da3aa6a.zip |
Fix assets tests in railties
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/assets_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 7e68de5674..a8d1382e94 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -54,8 +54,8 @@ module ApplicationTests capture(:stdout) do Dir.chdir(app_path){ `bundle exec rake assets:precompile` } end - files = Dir["#{app_path}/public/assets/application-b29a188b3d9c74ef7cbb7ddf9e99f953.js"] - files << Dir["#{app_path}/public/assets/foo/application-b29a188b3d9c74ef7cbb7ddf9e99f953.js"].first + files = Dir["#{app_path}/public/assets/application-*.js"] + files << Dir["#{app_path}/public/assets/foo/application-*.js"].first files.each do |file| assert_not_nil file, "Expected application.js asset to be generated, but none found" assert_equal "alert()", File.read(file) @@ -68,7 +68,7 @@ module ApplicationTests # capture(:stdout) do Dir.chdir(app_path){ `bundle exec rake assets:precompile RAILS_ENV=test` } # end - file = Dir["#{app_path}/public/assets/application-4bd8b7059c5336ec7ad515c9dbd59974.css"].first + file = Dir["#{app_path}/public/assets/application-*.css"].first assert_match /\/assets\/rails-([0-z]+)\.png/, File.read(file) end @@ -79,7 +79,7 @@ module ApplicationTests capture(:stdout) do Dir.chdir(app_path){ `bundle exec rake assets:precompile RAILS_GROUPS=assets` } end - file = Dir["#{app_path}/public/assets/application-8d301a938f1abfd789bbec87ed1ef770.css"].first + file = Dir["#{app_path}/public/assets/application-*.css"].first assert_match /\/assets\/rails-([0-z]+)\.png/, File.read(file) end |