spec/unit/error_spec.rb in tty-prompt-0.2.0 vs spec/unit/error_spec.rb in tty-prompt-0.3.0

- old
+ new

@@ -1,14 +1,8 @@ # encoding: utf-8 -require 'spec_helper' - RSpec.describe TTY::Prompt, '.error' do - let(:color) { Pastel.new(enabled: true) } - subject(:prompt) { TTY::TestPrompt.new } - - before { allow(Pastel).to receive(:new).and_return(color) } it 'displays one message' do prompt.error "Nothing is fine!" expect(prompt.output.string).to eql "\e[31mNothing is fine!\e[0m\n" end