Sha256: 44ee60fce3604c1ef64b137a8583fb467a17e7eae8d83bd0d9f358d131b9af6b

Contents?: true

Size: 752 Bytes

Versions: 13

Compression:

Stored size: 752 Bytes

Contents

require 'spec_helper'

module Relish
  module Command
    describe Config do

      describe '#default' do
        let(:config) { described_class.new }

        context 'with a local options file' do
          before do
            File.should_receive(:exists?).and_return(true)
            IO.should_receive(:read).and_return('options')
          end

          it 'outputs the contents' do
            config.should_receive(:puts).with('options')
            config.default
          end
        end

        context 'without a local options file' do
          it 'outputs the correct message' do
            config.should_receive(:puts).with('No .relish file exists')
            config.default
          end
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
relish-0.7.1 spec/relish/commands/config_spec.rb
relish-0.7 spec/relish/commands/config_spec.rb
relish-0.6 spec/relish/commands/config_spec.rb
relish-0.5.3 spec/relish/commands/config_spec.rb
relish-0.5.2 spec/relish/commands/config_spec.rb
relish-0.5.1 spec/relish/commands/config_spec.rb
relish-0.5.0 spec/relish/commands/config_spec.rb
relish-0.4.0 spec/relish/commands/config_spec.rb
relish-0.3.0 spec/relish/commands/config_spec.rb
relish-0.3.0.pre spec/relish/commands/config_spec.rb
relish-0.2.3 spec/relish/commands/config_spec.rb
relish-0.2.2 spec/relish/commands/config_spec.rb
relish-0.2.1 spec/relish/commands/config_spec.rb