mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add :skip_sprockets
to Rails::PluginBuilder::PASSTHROUGH_OPTIONS
`rails plugin new` with `--full` and `--skip-sprockets` options generates a dummy application that throws `NoMethodError`. ``` % rails plugin new my_engine -S --full --skip-gemspec % cd my_engine % bin/rails test rails aborted! NoMethodError: undefined method `assets' for #<Rails::Application::Configuration:0x007f83aa1e6100> ```
This commit is contained in:
parent
5f32221559
commit
592c06d7cb
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
* Add `:skip_sprockets` to `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`
|
||||
|
||||
*Tsukuru Tanimichi*
|
||||
|
||||
* Allow the use of listen's 3.1.x branch
|
||||
|
||||
*Esteban Santana Santana*
|
||||
|
|
|
@ -81,7 +81,7 @@ task default: :test
|
|||
end
|
||||
|
||||
PASSTHROUGH_OPTIONS = [
|
||||
:skip_active_record, :skip_action_mailer, :skip_javascript, :database,
|
||||
:skip_active_record, :skip_action_mailer, :skip_javascript, :skip_sprockets, :database,
|
||||
:javascript, :quiet, :pretend, :force, :skip
|
||||
]
|
||||
|
||||
|
|
|
@ -100,6 +100,14 @@ class PluginGeneratorTest < Rails::Generators::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_generating_adds_dummy_app_in_full_mode_without_sprockets
|
||||
run_generator [destination_root, "-S", "--full"]
|
||||
|
||||
assert_file "test/dummy/config/environments/production.rb" do |contents|
|
||||
assert_no_match(/config\.assets/, contents)
|
||||
end
|
||||
end
|
||||
|
||||
def test_generating_adds_dummy_app_rake_tasks_without_unit_test_files
|
||||
run_generator [destination_root, "-T", "--mountable", "--dummy-path", "my_dummy_app"]
|
||||
assert_file "Rakefile", /APP_RAKEFILE/
|
||||
|
|
Loading…
Reference in a new issue