Skip to content

Commit b4abba3

Browse files
authored
Merge pull request rails#40952 from jonathanhefner/plugin-dummy-skip-spring
Skip Spring in plugin dummy apps
2 parents 757970e + c05078b commit b4abba3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

railties/lib/rails/generators/rails/plugin/plugin_generator.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def generate_test_dummy(force = false)
103103
opts = options.transform_keys(&:to_sym).except(*DUMMY_IGNORE_OPTIONS)
104104
opts[:force] = force
105105
opts[:skip_bundle] = true
106+
opts[:skip_spring] = true
106107
opts[:skip_listen] = true
107108
opts[:skip_git] = true
108109
opts[:skip_turbolinks] = true

railties/test/generators/plugin_generator_test.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,14 @@ def test_unnecessary_files_are_not_generated_in_dummy_application
539539
assert_no_directory "test/dummy/.git"
540540
end
541541

542+
def test_spring_binstub_is_not_generated_in_dummy_application
543+
run_generator
544+
assert_no_file "test/dummy/bin/spring"
545+
assert_file "test/dummy/bin/rails" do |contents|
546+
assert_no_match %r/spring/, contents
547+
end
548+
end
549+
542550
def test_skipping_test_files
543551
run_generator [destination_root, "--skip-test"]
544552
assert_no_directory "test"

0 commit comments

Comments
 (0)