diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-17 11:48:15 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-17 11:48:15 +0200 |
commit | a9a20357220309e3bc7d06c5eac5619ca34b8c56 (patch) | |
tree | 74a37e8fb16d8420898d14bb1fc9e0818ee5928a /railties/test | |
parent | 3a68aec1a1c6329bfcbf0f87bdc2fbd75cb98feb (diff) | |
download | rails-a9a20357220309e3bc7d06c5eac5619ca34b8c56.tar.gz rails-a9a20357220309e3bc7d06c5eac5619ca34b8c56.tar.bz2 rails-a9a20357220309e3bc7d06c5eac5619ca34b8c56.zip |
Fix assets generators.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/assets_generator_test.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/railties/test/generators/assets_generator_test.rb b/railties/test/generators/assets_generator_test.rb index a2a40a28d4..e99f0f092a 100644 --- a/railties/test/generators/assets_generator_test.rb +++ b/railties/test/generators/assets_generator_test.rb @@ -6,27 +6,21 @@ class AssetsGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(posts) - def test_vanilla_assets + def test_assets run_generator - assert_file "app/assets/javascripts/posts.js" - assert_file "app/assets/stylesheets/posts.css" + assert_file "app/assets/javascripts/posts.js.coffee" + assert_file "app/assets/stylesheets/posts.css.scss" end def test_skipping_assets - content = run_generator ["posts", "--skip-assets"] - assert_no_file "app/assets/javascripts/posts.js" - assert_no_file "app/assets/stylesheets/posts.css" - end - - def test_coffee_javascript - self.generator_class.any_instance.stubs(:using_coffee?).returns(true) - run_generator - assert_file "app/assets/javascripts/posts.js.coffee" + content = run_generator ["posts", "--no-stylesheets", "--no-javascripts"] + assert_no_file "app/assets/javascripts/posts.js.coffee" + assert_no_file "app/assets/stylesheets/posts.css.scss" end - def test_sass_stylesheet - self.generator_class.any_instance.stubs(:using_sass?).returns(true) - run_generator - assert_file "app/assets/stylesheets/posts.css.scss" + def test_vanilla_assets + run_generator ["posts", "--no-javascript-engine", "--no-stylesheet-engine"] + assert_file "app/assets/javascripts/posts.js" + assert_file "app/assets/stylesheets/posts.css" end end |