Convert Pre/PostflightBlock test to spec.

This commit is contained in:
Markus Reiter 2017-02-08 10:09:00 +01:00
parent d9d15d3670
commit 8155d27e5c
2 changed files with 18 additions and 18 deletions

View File

@ -1,4 +1,4 @@
require "test_helper" require "spec_helper"
describe Hbc::Artifact::PostflightBlock do describe Hbc::Artifact::PostflightBlock do
describe "install_phase" do describe "install_phase" do
@ -13,10 +13,10 @@ describe Hbc::Artifact::PostflightBlock do
end end
end end
Hbc::Artifact::PostflightBlock.new(cask).install_phase described_class.new(cask).install_phase
called.must_equal true expect(called).to be true
yielded_arg.must_be_kind_of Hbc::DSL::Postflight expect(yielded_arg).to be_kind_of(Hbc::DSL::Postflight)
end end
end end
@ -32,10 +32,10 @@ describe Hbc::Artifact::PostflightBlock do
end end
end end
Hbc::Artifact::PostflightBlock.new(cask).uninstall_phase described_class.new(cask).uninstall_phase
called.must_equal true expect(called).to be true
yielded_arg.must_be_kind_of Hbc::DSL::UninstallPostflight expect(yielded_arg).to be_kind_of(Hbc::DSL::UninstallPostflight)
end end
end end
end end

View File

@ -1,4 +1,4 @@
require "test_helper" require "spec_helper"
describe Hbc::Artifact::PreflightBlock do describe Hbc::Artifact::PreflightBlock do
describe "install_phase" do describe "install_phase" do
@ -13,10 +13,10 @@ describe Hbc::Artifact::PreflightBlock do
end end
end end
Hbc::Artifact::PreflightBlock.new(cask).install_phase described_class.new(cask).install_phase
called.must_equal true expect(called).to be true
yielded_arg.must_be_kind_of Hbc::DSL::Preflight expect(yielded_arg).to be_kind_of Hbc::DSL::Preflight
end end
end end
@ -32,10 +32,10 @@ describe Hbc::Artifact::PreflightBlock do
end end
end end
Hbc::Artifact::PreflightBlock.new(cask).uninstall_phase described_class.new(cask).uninstall_phase
called.must_equal true expect(called).to be true
yielded_arg.must_be_kind_of Hbc::DSL::UninstallPreflight expect(yielded_arg).to be_kind_of Hbc::DSL::UninstallPreflight
end end
end end
end end