summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/init_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/commands/init_spec.rb')
-rw-r--r--spec/bundler/commands/init_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/bundler/commands/init_spec.rb b/spec/bundler/commands/init_spec.rb
index ed52187115..5f491a62c8 100644
--- a/spec/bundler/commands/init_spec.rb
+++ b/spec/bundler/commands/init_spec.rb
@@ -15,11 +15,11 @@ RSpec.describe "bundle init" do
end
it "does not change existing Gemfiles" do
- expect { bundle :init }.not_to change { File.read(bundled_app_gemfile) }
+ expect { bundle :init, :raise_on_error => false }.not_to change { File.read(bundled_app_gemfile) }
end
it "notifies the user that an existing Gemfile already exists" do
- bundle :init
+ bundle :init, :raise_on_error => false
expect(err).to include("Gemfile already exists")
end
end
@@ -48,7 +48,7 @@ RSpec.describe "bundle init" do
mode = File.stat(bundled_app(subdir)).mode ^ 0o222
FileUtils.chmod mode, bundled_app(subdir)
- bundle :init, :dir => bundled_app(subdir)
+ bundle :init, :dir => bundled_app(subdir), :raise_on_error => false
expect(err).to include("directory is not writable")
expect(Dir[bundled_app("#{subdir}/*")]).to be_empty
@@ -89,7 +89,7 @@ RSpec.describe "bundle init" do
S
end
- bundle :init, :gemspec => spec_file
+ bundle :init, :gemspec => spec_file, :raise_on_error => false
expect(err).to include("There was an error while loading `test.gemspec`")
end
end
@@ -112,11 +112,11 @@ RSpec.describe "bundle init" do
end
it "does not change existing Gemfiles" do
- expect { bundle :init }.not_to change { File.read(bundled_app("gems.rb")) }
+ expect { bundle :init, :raise_on_error => false }.not_to change { File.read(bundled_app("gems.rb")) }
end
it "notifies the user that an existing gems.rb already exists" do
- bundle :init
+ bundle :init, :raise_on_error => false
expect(err).to include("gems.rb already exists")
end
end