diff options
| author | Jack Nagel | 2014-02-27 14:22:42 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2014-02-27 14:22:42 -0600 | 
| commit | 7b1e6606366328fd744d28fbe9eab5942752ed56 (patch) | |
| tree | 897666416723e98984c698d130add9079199088b /Library/Homebrew/test | |
| parent | f4a3e5407b1a84f7a2e7d42f7b7ed02b1d62ca16 (diff) | |
| download | homebrew-7b1e6606366328fd744d28fbe9eab5942752ed56.tar.bz2 | |
Add set union to Options
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_options.rb | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb index 493aa100a..741581a01 100644 --- a/Library/Homebrew/test/test_options.rb +++ b/Library/Homebrew/test/test_options.rb @@ -126,6 +126,13 @@ class OptionsTests < Test::Unit::TestCase      assert_equal [foo], (@options & options).to_a    end +  def test_set_union +    foo, bar, baz = %w{foo bar baz}.map { |o| Option.new(o) } +    options = Options.new << foo << bar +    @options << foo << baz +    assert_equal [foo, bar, baz].sort, (@options | options).to_a.sort +  end +    def test_coerce_with_options      assert_same @options, Options.coerce(@options)    end  | 
