diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-02 00:34:43 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 22:17:43 +0100 |
commit | 74c340153ef42abe633b68f87e69e0c4978490bb (patch) | |
tree | 7923e2846d87ed104883c0a8a75ff8cba73ec538 | |
parent | b7a3eedd13088c037c291d935a4d715120a84dd1 (diff) | |
download | bundler-74c340153ef42abe633b68f87e69e0c4978490bb.tar.gz |
Make some `bundle gem` specs more explicit
-rw-r--r-- | spec/commands/newgem_spec.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 2c8ab4b5ef..fd56b43b74 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -17,7 +17,6 @@ RSpec.describe "bundle gem" do let(:require_path) { "mygem" } before do - global_config "BUNDLE_GEM__MIT" => "false", "BUNDLE_GEM__TEST" => "false", "BUNDLE_GEM__COC" => "false" git_config_content = <<-EOF [user] name = "Bundler User" @@ -567,39 +566,48 @@ RSpec.describe "bundle gem" do context "with mit option in bundle config settings set to true" do before do - global_config "BUNDLE_GEM__MIT" => "true", "BUNDLE_GEM__TEST" => "false", "BUNDLE_GEM__RUBOCOP" => "false", "BUNDLE_GEM__COC" => "false" + global_config "BUNDLE_GEM__MIT" => "true" end it_behaves_like "--mit flag" it_behaves_like "--no-mit flag" end context "with mit option in bundle config settings set to false" do + before do + global_config "BUNDLE_GEM__MIT" => "false" + end it_behaves_like "--mit flag" it_behaves_like "--no-mit flag" end context "with coc option in bundle config settings set to true" do before do - global_config "BUNDLE_GEM__MIT" => "false", "BUNDLE_GEM__TEST" => "false", "BUNDLE_GEM__RUBOCOP" => "false", "BUNDLE_GEM__COC" => "true" + global_config "BUNDLE_GEM__COC" => "true" end it_behaves_like "--coc flag" it_behaves_like "--no-coc flag" end context "with coc option in bundle config settings set to false" do + before do + global_config "BUNDLE_GEM__COC" => "false" + end it_behaves_like "--coc flag" it_behaves_like "--no-coc flag" end context "with rubocop option in bundle config settings set to true" do before do - global_config "BUNDLE_GEM__MIT" => "false", "BUNDLE_GEM__TEST" => "false", "BUNDLE_GEM__COC" => "false", "BUNDLE_GEM__RUBOCOP" => "true" + global_config "BUNDLE_GEM__RUBOCOP" => "true" end it_behaves_like "--rubocop flag" it_behaves_like "--no-rubocop flag" end context "with rubocop option in bundle config settings set to false" do + before do + global_config "BUNDLE_GEM__RUBOCOP" => "false" + end it_behaves_like "--rubocop flag" it_behaves_like "--no-rubocop flag" end |