Simplify BuildOptions copy tests
This commit is contained in:
parent
bc937f56e7
commit
0a605cbf8b
@ -75,16 +75,12 @@ class BuildOptionsTests < Homebrew::TestCase
|
|||||||
def test_copies_do_not_share_underlying_options
|
def test_copies_do_not_share_underlying_options
|
||||||
orig = BuildOptions.new []
|
orig = BuildOptions.new []
|
||||||
copy = orig.dup
|
copy = orig.dup
|
||||||
copy.add 'foo'
|
refute_same orig.args, copy.args
|
||||||
assert_empty orig
|
|
||||||
assert_equal 1, copy.count
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_copies_do_not_share_underlying_args
|
def test_copies_do_not_share_underlying_args
|
||||||
orig = BuildOptions.new []
|
orig = BuildOptions.new []
|
||||||
copy = orig.dup
|
copy = orig.dup
|
||||||
copy.args << Option.new('foo')
|
refute_same orig.args, copy.args
|
||||||
assert_empty orig.args
|
|
||||||
assert_equal 1, copy.args.count
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user