diff options
Diffstat (limited to 'railties/test/generators')
-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 |