Sha256: c631bfcac6c7cc8c92f210af044910a5a8362a8fb474e7c99a68fd5e94d96f58

Contents?: true

Size: 433 Bytes

Versions: 68

Compression:

Stored size: 433 Bytes

Contents

require 'test_helper'

class RegexpTest < Test::Unit::TestCase
  context "Regexp" do
    context ".union" do
      should "conform to doc" do
        assert_equal /cat/            , Regexp.union("cat")
        assert_equal /cat|dog/        , Regexp.union("cat", "dog") 
        assert_equal /cat|dog/        , Regexp.union(%w{ cat dog })
        assert_equal /cat|(?i-mx:dog)/, Regexp.union("cat", /dog/i)
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
marcandre-backports-1.6.0 test/regexp_test.rb
marcandre-backports-1.6.1 test/regexp_test.rb
marcandre-backports-1.6.3 test/regexp_test.rb
marcandre-backports-1.6.4 test/regexp_test.rb
marcandre-backports-1.6.6 test/regexp_test.rb
marcandre-backports-1.6.7 test/regexp_test.rb
marcandre-backports-1.6.8 test/regexp_test.rb
marcandre-backports-1.7.0 test/regexp_test.rb
marcandre-backports-1.7.1 test/regexp_test.rb
marcandre-backports-1.8.0 test/regexp_test.rb
marcandre-backports-1.8.1 test/regexp_test.rb
marcandre-backports-1.8.2 test/regexp_test.rb
marcandre-backports-1.8.3 test/regexp_test.rb
marcandre-backports-1.8.4 test/regexp_test.rb
marcandre-backports-1.9.0 test/regexp_test.rb
backports-2.3.0 test/regexp_test.rb
backports-2.2.1 test/regexp_test.rb
backports-2.2.0 test/regexp_test.rb
backports-2.1.0 test/regexp_test.rb
backports-2.0.3 test/regexp_test.rb