Sha256: 36b0239c768ff3f83a07cf333d622669e9b96af6b1a89da880cd441543443c5c

Contents?: true

Size: 626 Bytes

Versions: 7

Compression:

Stored size: 626 Bytes

Contents

require_relative '../../spec_helper'

require_relative '../../../lib/reek/cli/options'
require_relative '../../../lib/reek/report/report'

RSpec.describe Reek::CLI::OptionInterpreter do
  describe '#reporter' do
    let(:instance) { Reek::CLI::OptionInterpreter.new(options) }

    context 'with a valid set of options' do
      let(:options) do
        OpenStruct.new(report_format: :text,
                       location_format: :plain)
      end
      it 'returns an object of the correct subclass of Report::Base' do
        expect(instance.reporter).to be_instance_of Reek::Report::TextReport
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
reek-3.4.0 spec/reek/cli/option_interpreter_spec.rb
reek-3.3.1 spec/reek/cli/option_interpreter_spec.rb
reek-3.3.0 spec/reek/cli/option_interpreter_spec.rb
reek-3.2.1 spec/reek/cli/option_interpreter_spec.rb
reek-3.2 spec/reek/cli/option_interpreter_spec.rb
reek-3.1 spec/reek/cli/option_interpreter_spec.rb
reek-3.0.4 spec/reek/cli/option_interpreter_spec.rb