diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-04-19 21:15:39 -0400 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-06-11 16:54:12 -0300 |
commit | 94fdba9c92b233d3f5e9314266aabe51b51bb3e4 (patch) | |
tree | c508ec45581b9e3457cad28037b168ee7d2114af /railties/test | |
parent | e5b6188b47c811c94b7626a8ec42d946367b3c03 (diff) | |
download | rails-94fdba9c92b233d3f5e9314266aabe51b51bb3e4.tar.gz rails-94fdba9c92b233d3f5e9314266aabe51b51bb3e4.tar.bz2 rails-94fdba9c92b233d3f5e9314266aabe51b51bb3e4.zip |
Api apps scaffold does not generate assets
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/generators_test.rb | 1 | ||||
-rw-r--r-- | railties/test/generators/scaffold_generator_test.rb | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 6cb2bfd77b..36298f2385 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -140,6 +140,7 @@ module ApplicationTests assert Rails::Generators.hidden_namespaces.include?("js") assert Rails::Generators.hidden_namespaces.include?("css") assert Rails::Generators.options[:rails][:api] + assert_equal false, Rails::Generators.options[:rails][:assets] assert_equal false, Rails::Generators.options[:rails][:helper] assert_nil Rails::Generators.options[:rails][:template_engine] end diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index 05a5c926eb..775f4b4ff5 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -88,7 +88,7 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase end def test_api_scaffold_on_invoke - run_generator %w(product_line title:string product:belongs_to user:references --api --no-template-engine --no-helper) + run_generator %w(product_line title:string product:belongs_to user:references --api --no-template-engine --no-helper --no-assets) # Model assert_file "app/models/product_line.rb", /class ProductLine < ActiveRecord::Base/ @@ -150,6 +150,11 @@ class ScaffoldGeneratorTest < Rails::Generators::TestCase # Helpers assert_no_file "app/helpers/product_lines_helper.rb" + + # Assets + assert_no_file "app/assets/stylesheets/scaffold.css" + assert_no_file "app/assets/javascripts/product_lines.js" + assert_no_file "app/assets/stylesheets/product_lines.css" end def test_functional_tests_without_attributes |