Sha256: 095c4be1346be4c485bbd8ffd21ce9b28bd8bcfef0bea9a8e6561e30640ff374

Contents?: true

Size: 823 Bytes

Versions: 20

Compression:

Stored size: 823 Bytes

Contents

require 'spec_helper'
require 'scss_lint/options'

describe SCSSLint::Options do
  describe '#parse' do
    subject { super().parse(args) }

    context 'when no arguments are specified' do
      let(:args) { [] }

      it { should be_a Hash }

      it 'defines no files to lint by default' do
        subject[:files].should be_empty
      end

      it 'specifies the DefaultReporter by default' do
        subject[:reporters].first.should include 'Default'
      end

      it 'outputs to STDOUT' do
        subject[:reporters].first.should include :stdout
      end
    end

    context 'when a non-existent flag is specified' do
      let(:args) { ['--totally-made-up-flag'] }

      it 'raises an error' do
        expect { subject }.to raise_error SCSSLint::Exceptions::InvalidCLIOption
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
scss_lint-0.43.2 spec/scss_lint/options_spec.rb
scss_lint-0.43.1 spec/scss_lint/options_spec.rb
scss_lint-0.43.0 spec/scss_lint/options_spec.rb
scss_lint-0.42.2 spec/scss_lint/options_spec.rb
scss_lint-0.42.1 spec/scss_lint/options_spec.rb
scss_lint-0.42.0 spec/scss_lint/options_spec.rb
scss_lint-0.41.0 spec/scss_lint/options_spec.rb
scss_lint-0.40.1 spec/scss_lint/options_spec.rb
scss_lint-0.40.0 spec/scss_lint/options_spec.rb
scss_lint-0.39.0 spec/scss_lint/options_spec.rb
scss_lint-0.38.0 spec/scss_lint/options_spec.rb
scss-lint-0.38.0 spec/scss_lint/options_spec.rb
scss-lint-bliss-1.0.0 spec/scss_lint/options_spec.rb
scss-lint-0.37.0 spec/scss_lint/options_spec.rb
scss-lint-0.36.1 spec/scss_lint/options_spec.rb
scss-lint-0.36.0 spec/scss_lint/options_spec.rb
scss-lint-0.35.0 spec/scss_lint/options_spec.rb
scss-lint-0.34.0 spec/scss_lint/options_spec.rb
scss-lint-0.33.0 spec/scss_lint/options_spec.rb
scss-lint-0.32.0 spec/scss_lint/options_spec.rb