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

Merge pull request #2157 from reitermarkus/spec-create

Convert `brew create` test to spec.
parents 7ad8fcb6 7f8cd184
No related branches found
Tags 2.2.0
No related merge requests found
require "testing_env"
class IntegrationCommandTestCreate < IntegrationCommandTestCase
def test_create
url = "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
cmd("create", url, "HOMEBREW_EDITOR" => "/bin/cat")
formula_file = CoreTap.new.formula_dir/"testball.rb"
assert formula_file.exist?, "The formula source should have been created"
assert_match %Q(sha256 "#{TESTBALL_SHA256}"), formula_file.read
end
end
describe "brew create", :integration_test do
let(:url) { "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" }
let(:formula_file) { CoreTap.new.formula_dir/"testball.rb" }
it "creates a new Formula file for a given URL" do
shutup do
brew "create", url, "HOMEBREW_EDITOR" => "/bin/cat"
end
expect(formula_file).to exist
expect(formula_file.read).to match(%Q(sha256 "#{TESTBALL_SHA256}"))
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