Skip to content
Snippets Groups Projects
Commit 3470edd6 authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #2164 from reitermarkus/spec-bundle

Convert `brew bundle` test to spec.
parents 798e8ec4 b54ba26d
No related branches found
No related tags found
No related merge requests found
require "testing_env"
class IntegrationCommandTestBundle < IntegrationCommandTestCase
def test_bundle
needs_test_cmd_taps
setup_remote_tap("homebrew/bundle")
HOMEBREW_REPOSITORY.cd do
shutup do
system "git", "init"
system "git", "commit", "--allow-empty", "-m", "This is a test commit"
end
end
mktmpdir do |path|
FileUtils.touch "#{path}/Brewfile"
Dir.chdir path do
assert_equal "The Brewfile's dependencies are satisfied.",
cmd("bundle", "check")
end
end
end
end
describe "brew bundle", :integration_test, :needs_test_cmd_taps do
describe "check" do
it "checks if a Brewfile's dependencies are satisfied" do
setup_remote_tap "homebrew/bundle"
HOMEBREW_REPOSITORY.cd do
shutup do
system "git", "init"
system "git", "commit", "--allow-empty", "-m", "This is a test commit"
end
end
Dir.mktmpdir do |path|
FileUtils.touch "#{path}/Brewfile"
Dir.chdir path do
expect { brew "bundle", "check" }
.to output("The Brewfile's dependencies are satisfied.\n").to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment