Sha256: 835fb04f36b2a87f2f8d861091d328fc2ef42f836e1b69e206915ae1bb1799ff

Contents?: true

Size: 701 Bytes

Versions: 17

Compression:

Stored size: 701 Bytes

Contents

shared_examples CMSScanner::Formatter::ClassMethods do
  describe '#load' do
    context 'w/o parameter' do
      it 'loads the default formatter' do
        expect(subject.load).to be_a subject::Cli
      end
    end

    it 'loads the correct formatter' do
      expect(subject.load('cli_no_colour')).to be_a subject::CliNoColour
    end

    it 'adds the custom_views' do
      formatter = subject.load(nil, %w(/path/views1 /path2/views))

      expect(formatter.views_directories).to include('/path/views1', '/path2/views')
    end
  end

  describe '#availables' do
    it 'returns the right list' do
      expect(subject.availables).to match_array(%w(json cli-no-colour cli))
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
cms_scanner-0.0.18 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.17 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.16 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.15 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.14 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.13 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.12 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.11 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.10 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.9 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.8 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.7 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.6 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.5 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.4 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.3 spec/shared_examples/formatter_class_methods.rb
cms_scanner-0.0.2 spec/shared_examples/formatter_class_methods.rb