diff options
author | José Valim <jose.valim@gmail.com> | 2010-11-15 23:59:18 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-16 00:04:38 +0100 |
commit | bd96e45641df33d91ebc7b1dbb1589b376c6ef24 (patch) | |
tree | 0145f0717d7accc1f27579ac0c73f35ae4b6b6b1 /railties/test | |
parent | 1d5842b27ce9aa3f160f4bddb290367b5a2d3111 (diff) | |
download | rails-bd96e45641df33d91ebc7b1dbb1589b376c6ef24.tar.gz rails-bd96e45641df33d91ebc7b1dbb1589b376c6ef24.tar.bz2 rails-bd96e45641df33d91ebc7b1dbb1589b376c6ef24.zip |
Fix failing tests.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/railties/engine_test.rb | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 822be24ef1..701b6816c8 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -224,32 +224,14 @@ module RailtiesTest end RUBY - @plugin.write "app/views/foo/index.html.erb", <<-RUBY - <%= compute_public_path("/foo", "") %> + @plugin.write "app/views/foo/index.html.erb", <<-ERB <%= image_path("foo.png") %> <%= javascript_include_tag("foo") %> <%= stylesheet_link_tag("foo") %> - RUBY - - - app_file "app/controllers/bar_controller.rb", <<-RUBY - class BarController < ActionController::Base - def index - render :index - end - end - RUBY - - app_file "app/views/bar/index.html.erb", <<-RUBY - <%= compute_public_path("/foo", "") %> - RUBY + ERB add_to_config 'config.asset_path = "/omg%s"' - @plugin.write 'public/touch.txt', <<-RUBY - touch - RUBY - boot_rails # should set asset_path with engine name by default @@ -259,11 +241,10 @@ module RailtiesTest env = Rack::MockRequest.env_for("/foo") response = Bukkits::Engine.call(env) - stripped_body = response[2].body.split("\n").map(&:strip).join("\n") + stripped_body = response[2].body.split("\n").map(&:strip).join - expected = "/omg/bukkits/foo\n" + - "/omg/bukkits/images/foo.png\n" + - "<script src=\"/omg/bukkits/javascripts/foo.js\" type=\"text/javascript\"></script>\n" + + expected = "/omg/bukkits/images/foo.png" + + "<script src=\"/omg/bukkits/javascripts/foo.js\" type=\"text/javascript\"></script>" + "<link href=\"/omg/bukkits/stylesheets/foo.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />" assert_equal expected, stripped_body end @@ -278,21 +259,18 @@ module RailtiesTest @plugin.write "app/controllers/foo_controller.rb", <<-RUBY class FooController < ActionController::Base def index + render :inline => '<%= image_path("foo.png") %>' end end RUBY - @plugin.write "app/views/foo/index.html.erb", <<-RUBY - <%= compute_public_path("/foo", "") %> - RUBY - boot_rails env = Rack::MockRequest.env_for("/foo") response = Bukkits::Engine.call(env) stripped_body = response[2].body.strip - expected = "/bukkits/foo" + expected = "/bukkits/images/foo.png" assert_equal expected, stripped_body end |