diff options
Diffstat (limited to 'spec/commands/show_spec.rb')
-rw-r--r-- | spec/commands/show_spec.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb index b21892bae2..7b329c8e7f 100644 --- a/spec/commands/show_spec.rb +++ b/spec/commands/show_spec.rb @@ -10,19 +10,19 @@ RSpec.describe "bundle show", :bundler => "< 3" do end it "creates a Gemfile.lock if one did not exist" do - FileUtils.rm("Gemfile.lock") + FileUtils.rm(bundled_app_lock) bundle! "show" - expect(bundled_app("Gemfile.lock")).to exist + expect(bundled_app_lock).to exist end it "creates a Gemfile.lock when invoked with a gem name" do - FileUtils.rm("Gemfile.lock") + FileUtils.rm(bundled_app_lock) bundle! "show rails" - expect(bundled_app("Gemfile.lock")).to exist + expect(bundled_app_lock).to exist end it "prints path if gem exists in bundle" do @@ -143,13 +143,12 @@ RSpec.describe "bundle show", :bundler => "< 3" do context "in a fresh gem in a blank git repo" do before :each do build_git "foo", :path => lib_path("foo") - Dir.chdir lib_path("foo") - File.open("Gemfile", "w") {|f| f.puts "gemspec" } - sys_exec "rm -rf .git && git init" + File.open(lib_path("foo/Gemfile"), "w") {|f| f.puts "gemspec" } + sys_exec "rm -rf .git && git init", :dir => lib_path("foo") end it "does not output git errors" do - bundle :show + bundle :show, :dir => lib_path("foo") expect(err_without_deprecations).to be_empty end end |