Sha256: 82aa785e040d0330e0f1c3defb754512c1cbd98d65465eb10ae0cc05f5294675
Contents?: true
Size: 576 Bytes
Versions: 6
Compression:
Stored size: 576 Bytes
Contents
require_relative '../../spec_helper' require_relative '../../../lib/reek/cli/options' RSpec.describe Reek::CLI::Options do describe '#initialize' do it 'should enable colors when stdout is a TTY' do allow($stdout).to receive_messages(tty?: false) options = Reek::CLI::Options.new.parse expect(options.colored).to be false end it 'should not enable colors when stdout is not a TTY' do allow($stdout).to receive_messages(tty?: true) options = Reek::CLI::Options.new.parse expect(options.colored).to be true end end end
Version data entries
6 entries across 6 versions & 1 rubygems