summaryrefslogtreecommitdiff
path: root/spec/bundler/ui/shell_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/ui/shell_spec.rb')
-rw-r--r--spec/bundler/ui/shell_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/bundler/ui/shell_spec.rb b/spec/bundler/ui/shell_spec.rb
index 9a47a3572f..951a446aff 100644
--- a/spec/bundler/ui/shell_spec.rb
+++ b/spec/bundler/ui/shell_spec.rb
@@ -59,6 +59,15 @@ RSpec.describe Bundler::UI::Shell do
it "prints to stderr" do
expect { subject.error("error!!!") }.to output("error!!!\n").to_stderr
end
+
+ context "when stderr is closed" do
+ it "doesn't report anything" do
+ output = capture(:stderr, :closed => true) do
+ subject.error("Something went wrong")
+ end
+ expect(output).to_not eq("Something went wrong\n")
+ end
+ end
end
end
end