diff options
| author | Markus Reiter | 2017-02-25 07:03:02 +0100 |
|---|---|---|
| committer | GitHub | 2017-02-25 07:03:02 +0100 |
| commit | 1f9faa09a9b472ee8550e2aeefd3d41c7cb3739b (patch) | |
| tree | b3e4e0b4fbd49d9d3b26155c418c9c10666a7881 | |
| parent | 6a2693ba3d9423f37bcb8ee9bf01e9e3f6bf9203 (diff) | |
| parent | be498acf4fee38912a497b26e2beed97ee1f8b9a (diff) | |
| download | brew-1f9faa09a9b472ee8550e2aeefd3d41c7cb3739b.tar.bz2 | |
Merge pull request #2128 from reitermarkus/spec-unpack
Convert `brew unpack` test to spec.
| -rw-r--r-- | Library/Homebrew/test/cmd/unpack_spec.rb | 16 | ||||
| -rw-r--r-- | Library/Homebrew/test/unpack_test.rb | 13 |
2 files changed, 16 insertions, 13 deletions
diff --git a/Library/Homebrew/test/cmd/unpack_spec.rb b/Library/Homebrew/test/cmd/unpack_spec.rb new file mode 100644 index 000000000..244fc0852 --- /dev/null +++ b/Library/Homebrew/test/cmd/unpack_spec.rb @@ -0,0 +1,16 @@ +describe "brew unpack", :integration_test do + it "unpacks a given Formula's archive" do + setup_test_formula "testball" + + Dir.mktmpdir do |path| + path = Pathname.new(path) + + shutup do + expect { brew "unpack", "testball", "--destdir=#{path}" } + .to be_a_success + end + + expect(path/"testball-0.1").to be_a_directory + end + end +end diff --git a/Library/Homebrew/test/unpack_test.rb b/Library/Homebrew/test/unpack_test.rb deleted file mode 100644 index bbff6ad1c..000000000 --- a/Library/Homebrew/test/unpack_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -require "testing_env" - -class IntegrationCommandTestUnpack < IntegrationCommandTestCase - def test_unpack - setup_test_formula "testball" - - mktmpdir do |path| - cmd "unpack", "testball", "--destdir=#{path}" - assert File.directory?("#{path}/testball-0.1"), - "The tarball should be unpacked" - end - end -end |
