Sha256: 4fb3ab806f480bee61179805c6b8b86cbd9172e591ecf4f0446c8a73fbf816a4

Contents?: true

Size: 894 Bytes

Versions: 1

Compression:

Stored size: 894 Bytes

Contents

require 'spec_helper'

describe Shoes, 'load_backend' do
  it "raises on bad input" do
    expect { Shoes.load_backend :bogus }.to raise_error(LoadError)
  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 {}
    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

1 entries across 1 versions & 1 rubygems

Version Path
shoes-core-4.0.0.pre7 spec/shoes_spec.rb