Convert MPIRequirement test to spec.
This commit is contained in:
parent
a74b7ade66
commit
8fee9bf44d
14
Library/Homebrew/test/mpi_requirement_spec.rb
Normal file
14
Library/Homebrew/test/mpi_requirement_spec.rb
Normal file
@ -0,0 +1,14 @@
|
||||
require "requirements/mpi_requirement"
|
||||
|
||||
describe MPIRequirement do
|
||||
describe "::new" do
|
||||
subject { described_class.new(*(wrappers + tags)) }
|
||||
let(:wrappers) { [:cc, :cxx, :f77] }
|
||||
let(:tags) { [:optional, "some-other-tag"] }
|
||||
|
||||
it "untangles wrappers and tags" do
|
||||
expect(subject.lang_list).to eq(wrappers)
|
||||
expect(subject.tags).to eq(tags)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,12 +0,0 @@
|
||||
require "testing_env"
|
||||
require "requirements/mpi_requirement"
|
||||
|
||||
class MPIRequirementTests < Homebrew::TestCase
|
||||
def test_initialize_untangles_tags_and_wrapper_symbols
|
||||
wrappers = [:cc, :cxx, :f77]
|
||||
tags = [:optional, "some-other-tag"]
|
||||
dep = MPIRequirement.new(*wrappers + tags)
|
||||
assert_equal wrappers, dep.lang_list
|
||||
assert_equal tags, dep.tags
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user