Skip to content
Snippets Groups Projects
Commit 7f8cd184 authored by Markus Reiter's avatar Markus Reiter
Browse files

Convert `brew create` test to spec.

parent c7121f6b
No related branches found
No related tags found
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