aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-23 06:00:46 +0100
committerMarkus Reiter2017-02-23 21:35:42 +0100
commit7f8cd184936e3419a5bf960121f76098505d6811 (patch)
treea19786f25bd705b1e3be671275c6bb6bf351b626 /Library
parentc7121f6be50e44784e3e29114617c29715bd9c0f (diff)
downloadbrew-7f8cd184936e3419a5bf960121f76098505d6811.tar.bz2
Convert `brew create` test to spec.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/create_test.rb12
-rw-r--r--Library/Homebrew/test/dev-cmd/create_spec.rb13
2 files changed, 13 insertions, 12 deletions
diff --git a/Library/Homebrew/test/create_test.rb b/Library/Homebrew/test/create_test.rb
deleted file mode 100644
index aeee428aa..000000000
--- a/Library/Homebrew/test/create_test.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-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
diff --git a/Library/Homebrew/test/dev-cmd/create_spec.rb b/Library/Homebrew/test/dev-cmd/create_spec.rb
new file mode 100644
index 000000000..b7f96ec7f
--- /dev/null
+++ b/Library/Homebrew/test/dev-cmd/create_spec.rb
@@ -0,0 +1,13 @@
+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