spec/reek/cli/options_spec.rb in reek-4.4.2 vs spec/reek/cli/options_spec.rb in reek-4.5.0

- old
+ new

@@ -12,16 +12,26 @@ it 'sets a valid default value for location_format' do expect(options.location_format).to eq :numbers end it 'enables colors when stdout is a TTY' do + allow($stdout).to receive_messages(tty?: true) + expect(options.colored).to be true + end + + it 'does not enable colors when stdout is not a TTY' do allow($stdout).to receive_messages(tty?: false) expect(options.colored).to be false end - it 'does not enable colors when stdout is not a TTY' do + it 'enables progress when stdout is a TTY' do allow($stdout).to receive_messages(tty?: true) - expect(options.colored).to be true + expect(options.progress_format).to eq :dots + end + + it 'does not enable progress when stdout is not a TTY' do + allow($stdout).to receive_messages(tty?: false) + expect(options.progress_format).to eq :quiet end end describe 'parse' do it 'raises on invalid argument in ARGV' do