未验证 提交 f960920a 编写于 作者: E Eileen M. Uchitelle 提交者: GitHub

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'
......@@ -678,6 +678,22 @@ def test_inclusion_of_listen_related_configuration_by_default
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册