Sha256: 555c4c581d203321133a69b3e71e2e2168c11724e05d8861c9990e1fb1774578
Contents?: true
Size: 839 Bytes
Versions: 7
Compression:
Stored size: 839 Bytes
Contents
require_relative '../../spec_helper' require_relative '../../../lib/reek/cli/options' RSpec.describe Reek::CLI::Options do describe '#parse' do context 'with no arguments passed' do let(:options) { Reek::CLI::Options.new.parse } it 'enables colors when stdout is 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 allow($stdout).to receive_messages(tty?: true) expect(options.colored).to be true end it 'sets a valid default value for report_format' do expect(options.report_format).to eq :text end it 'sets a valid default value for location_format' do expect(options.location_format).to eq :numbers end end end end
Version data entries
7 entries across 7 versions & 1 rubygems