From 18b2223b3290c4b3daa310edfc06b4d51161c312 Mon Sep 17 00:00:00 2001 From: "Andrey A.I. Sitnik" Date: Mon, 22 Aug 2011 09:36:36 +1100 Subject: Allow to debug assets by config.assets.debug --- actionpack/test/template/sprockets_helper_test.rb | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index d303acad0f..cac277cf11 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -141,8 +141,6 @@ class SprocketsHelperTest < ActionView::TestCase end test "javascript include tag" do - Rails.env.stubs(:test?).returns(false) - assert_match %r{}, javascript_include_tag(:application) @@ -156,14 +154,12 @@ class SprocketsHelperTest < ActionView::TestCase assert_match %r{\n}, javascript_include_tag("xmlhr", "extra") - Rails.env.stubs(:test?).returns(true) + assert_match %r{\n}, + javascript_include_tag(:application, :debug => true) + @config.assets.debug = true assert_match %r{\n}, javascript_include_tag(:application) - - assert_match %r{}, - javascript_include_tag(:application, :debug => false) - end test "stylesheet path" do @@ -180,8 +176,6 @@ class SprocketsHelperTest < ActionView::TestCase end test "stylesheet link tag" do - Rails.env.stubs(:test?).returns(false) - assert_match %r{}, stylesheet_link_tag(:application) @@ -200,14 +194,12 @@ class SprocketsHelperTest < ActionView::TestCase assert_match %r{\n}, stylesheet_link_tag("style", "extra") - Rails.env.stubs(:test?).returns(true) + assert_match %r{\n}, + stylesheet_link_tag(:application, :debug => true) + @config.assets.debug = true assert_match %r{\n}, stylesheet_link_tag(:application) - - assert_match %r{}, - stylesheet_link_tag(:application, :debug => false) - end test "alternate asset prefix" do -- cgit v1.2.3