aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2019-04-03 13:20:17 -0400
committerGitHub <noreply@github.com>2019-04-03 13:20:17 -0400
commitf960920a8e8501cb5af2504166fe45b867705b88 (patch)
tree7833f393dfeafebd7b6ae99a26d279397e26dc0f
parentaf56c5c1c6d6f96790b0b609af39d6df9dad6104 (diff)
parentf069ac2156e3822904c75a140d6012dd867f3521 (diff)
downloadrails-f960920a8e8501cb5af2504166fe45b867705b88.tar.gz
rails-f960920a8e8501cb5af2504166fe45b867705b88.tar.bz2
rails-f960920a8e8501cb5af2504166fe45b867705b88.zip
Merge pull request #35843 from eregon/fix-gem-listen-in-gemfile-master
Add test that the listen gem is included when RUBY_ENGINE is not 'ruby'
-rw-r--r--railties/test/generators/app_generator_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index d30cd9e718..87de68fdbd 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -678,6 +678,22 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_inclusion_of_listen_related_configuration_on_other_rubies
+ ruby_engine = Object.send(:remove_const, :RUBY_ENGINE)
+ Object.const_set(:RUBY_ENGINE, "MyRuby")
+ begin
+ run_generator
+ if RbConfig::CONFIG["host_os"] =~ /darwin|linux/
+ assert_listen_related_configuration
+ else
+ assert_no_listen_related_configuration
+ end
+ ensure
+ Object.send(:remove_const, :RUBY_ENGINE)
+ Object.const_set(:RUBY_ENGINE, ruby_engine)
+ end
+ end
+
def test_non_inclusion_of_listen_related_configuration_if_skip_listen
run_generator [destination_root, "--skip-listen"]
assert_no_listen_related_configuration