Sha256: 0ae6d1421bf32d85e2eb843b18324c10ad1d934e86904d07aecf08b355ac7d91

Contents?: true

Size: 797 Bytes

Versions: 8

Compression:

Stored size: 797 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

8 entries across 8 versions & 1 rubygems

Version Path
relish-0.2.0 spec/relish/commands/config_spec.rb
relish-0.1.6 spec/relish/commands/config_spec.rb
relish-0.1.5 spec/relish/commands/config_spec.rb
relish-0.1.4 spec/relish/commands/config_spec.rb
relish-0.1.3 spec/relish/commands/config_spec.rb
relish-0.1.2 spec/relish/commands/config_spec.rb
relish-0.1.1 spec/relish/commands/config_spec.rb
relish-0.1.0 spec/relish/commands/config_spec.rb