Sha256: 151117e4ad675efe8504df08fab69ec691ada30974ab8956c7670fce6101516c

Contents?: true

Size: 904 Bytes

Versions: 4

Compression:

Stored size: 904 Bytes

Contents

require 'spec_helper'

describe Shoes, 'load_backend' do
  it "raises ArgumentError on bad input" do
    expect { Shoes.load_backend :bogus }.to raise_error
  end
end

describe Shoes, 'setup' do

  it 'knows this method' do
    expect(Shoes).to respond_to :setup
  end

  describe 'outputting on standard error' do

    def expect_stderr_puts(regex)
      expect($stderr).to receive(:puts).with(regex)
    end

    before :each do
      expect_stderr_puts(/WARN.+deprecated/)
    end

    it 'puts a warning message to $stderr' do
      Shoes.setup do end
    end

    it 'warns for individual gems' do
      expect_stderr_puts(/WARN.+foo.+gem install foo/)
      Shoes.setup do
        gem 'foo'
      end
    end

    it 'even reports the version number' do
      expect_stderr_puts(/gem install foo --version \"~>2.10.0\"/)
      Shoes.setup do
        gem 'foo ~>2.10.0'
      end
    end
  end

end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
shoes-core-4.0.0.pre4 spec/shoes_spec.rb
shoes-core-4.0.0.pre3 spec/shoes_spec.rb
shoes-swt-4.0.0.pre2 spec/shoes_spec.rb
shoes-dsl-4.0.0.pre2 spec/shoes_spec.rb