Sha256: 70d40350e2ee1f8cdf92fd44b78e8066b8b52aca87716d9d0a466450d0f6bb46

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

require 'spec_helper'

describe Brewdler::Commands::Install do
  context "when a Brewfile is not found" do
    it "raises an error" do
      expect { Brewdler::Commands::Install.run }.to raise_error
    end
  end

  context "when a Brewfile is found" do
    it "does not raise an error" do
      File.stub(:read).and_return("tap 'phinze/cask'\nbrew 'git'\ncask 'google-chrome'")
      expect { Brewdler::Commands::Install.run }.to_not raise_error('No Brewfile found')

      File.stub(:read => 'git', :open => ['git'])
      expect { Brewdler::Commands::Install.run }.to_not raise_error('No Brewfile found')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
brewdler-1.0.1 spec/install_command_spec.rb
brewdler-1.0.0 spec/install_command_spec.rb
brewdler-0.5.0 spec/install_command_spec.rb