Sha256: 61527bd8af3b1da26e3e9e8a8ce76dd23a905bfb258363f5719ed0b6c4068c1c
Contents?: true
Size: 1.3 KB
Versions: 9
Compression:
Stored size: 1.3 KB
Contents
require 'spec_helper' require 'rocket_fuel/precheck/command_line_result_presenter' describe RocketFuel::Precheck::CommandLineResultPresenter do let(:success_icon) do RocketFuel::Precheck::CommandLineResultPresenter::SUCCESS_ICON[0] end let(:failure_icon) do RocketFuel::Precheck::CommandLineResultPresenter::FAILURE_ICON[0] end it 'includes the message' do message = 'clearance granted.' result = RocketFuel::Precheck::CheckResult.new(true, message, :something) presented_result = RocketFuel::Precheck::CommandLineResultPresenter.new(result) expect(capture(:stdout) { presented_result.present }).to include(message) end it 'starts with a success icon if the result is successful' do result = RocketFuel::Precheck::CheckResult.new(true, 'clearance granted.', :something) presented_result = RocketFuel::Precheck::CommandLineResultPresenter.new(result) expect(capture(:stdout) { presented_result.present }).to include(success_icon) end it 'starts with a failure icon if the result is not successful' do result = RocketFuel::Precheck::CheckResult.new(false, 'clearance granted.', :something) presented_result = RocketFuel::Precheck::CommandLineResultPresenter.new(result) expect(capture(:stdout) { presented_result.present }).to include(failure_icon) end end
Version data entries
9 entries across 9 versions & 1 rubygems