aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2011-04-14 21:32:18 +0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-15 00:32:27 +0800
commit89884c194af77f5324509db1d14e20f45fc106e0 (patch)
tree5192904d77af864918fdec40fe7ab5ea611590fc /railties/test
parent93641ed6c8c684f6b4db02b6c8a22fa9bc7f0eaf (diff)
downloadrails-89884c194af77f5324509db1d14e20f45fc106e0.tar.gz
rails-89884c194af77f5324509db1d14e20f45fc106e0.tar.bz2
rails-89884c194af77f5324509db1d14e20f45fc106e0.zip
Update scaffold controller to generate scss file if Sass is available
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/stylesheets_generator_test.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/railties/test/generators/stylesheets_generator_test.rb b/railties/test/generators/stylesheets_generator_test.rb
index aaeb686daa..4b86cdd1c7 100644
--- a/railties/test/generators/stylesheets_generator_test.rb
+++ b/railties/test/generators/stylesheets_generator_test.rb
@@ -4,14 +4,20 @@ require 'rails/generators/rails/stylesheets/stylesheets_generator'
class StylesheetsGeneratorTest < Rails::Generators::TestCase
include GeneratorsTestHelper
- def test_copy_stylesheets
+ def test_copy_scss_stylesheet
+ self.generator_class.any_instance.stubs(:using_sass?).returns(true)
run_generator
- assert_file "public/stylesheets/scaffold.css"
+ assert_file "app/assets/stylesheets/scaffold.css.scss"
+ end
+
+ def test_copy_css_stylesheet
+ run_generator
+ assert_file "app/assets/stylesheets/scaffold.css"
end
def test_stylesheets_are_not_deleted_on_revoke
run_generator
run_generator [], :behavior => :revoke
- assert_file "public/stylesheets/scaffold.css"
+ assert_file "app/assets/stylesheets/scaffold.css"
end
end