diff options
Diffstat (limited to 'spec/bundler/ui')
-rw-r--r-- | spec/bundler/ui/shell_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/bundler/ui/shell_spec.rb b/spec/bundler/ui/shell_spec.rb index 82ff63a831..6585ab1da8 100644 --- a/spec/bundler/ui/shell_spec.rb +++ b/spec/bundler/ui/shell_spec.rb @@ -34,10 +34,15 @@ RSpec.describe Bundler::UI::Shell do describe "#error" do before { subject.level = "error" } - it "prints to stdout" do + + it "prints to stdout", :bundler => "<= 2" do expect { subject.error("error!!!") }.to output("error!!!\n").to_stdout end + it "prints to stderr", :bundler => "2" do + expect { subject.error("error!!!") }.to output("error!!!\n").to_stderr + end + context "when stderr flag is enabled" do before { Bundler.settings.temporary(:error_on_stderr => true) } it "prints to stderr" do |