diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-06-23 14:00:25 -0300 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2018-06-23 14:00:25 -0300 |
commit | 3b0c1ef9c4b4a255d5069316f05338e404d5bd96 (patch) | |
tree | 66e59c6680a2fa0cc5dccc3112e6432ba04af51d | |
parent | d2a91a7f90584dd3552430740c549d8c9257a588 (diff) | |
download | rails-3b0c1ef9c4b4a255d5069316f05338e404d5bd96.tar.gz rails-3b0c1ef9c4b4a255d5069316f05338e404d5bd96.tar.bz2 rails-3b0c1ef9c4b4a255d5069316f05338e404d5bd96.zip |
Improve readability of some specs
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 00ca8cad0d..58a6067cee 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -739,17 +739,23 @@ class AppGeneratorTest < Rails::Generators::TestCase end def test_generation_runs_bundle_install - assert_generates_with_bundler + generator([destination_root], {}) + + assert_bundler_command_called("install") end def test_dev_option - assert_generates_with_bundler dev: true + generator([destination_root], dev: true) + + assert_bundler_command_called("install") rails_path = File.expand_path("../../..", Rails.root) assert_file "Gemfile", /^gem\s+["']rails["'],\s+path:\s+["']#{Regexp.escape(rails_path)}["']$/ end def test_edge_option - assert_generates_with_bundler edge: true + generator([destination_root], edge: true) + + assert_bundler_command_called("install") assert_file "Gemfile", %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["']$} end @@ -1026,12 +1032,6 @@ class AppGeneratorTest < Rails::Generators::TestCase end end - def assert_generates_with_bundler(options = {}) - generator([destination_root], options) - - assert_bundler_command_called("install") - end - def assert_bundler_command_called(target_command) command_check = -> command do @command_called ||= 0 |