Sha256: d9803a32b1085ea4e0d22a63466e589ff4d6df9403dc7860f54591a4908761ea

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

# encoding: UTF-8
# frozen_string_literal: true

require 'bundler'
Bundler.require :default, :development, :test

class RegexpMatchPolyfillTest < Test::Unit::TestCase
  def test_regexp_match
    assert_true(/foo/.match?('foo'))
    assert_false(/bar/.match?('foo'))
  end

  def test_string_match
    assert_true 'foo'.match?(/foo/)
    assert_false 'foo'.match?(/bar/)
  end

  def test_symbol_match
    assert_true :foo.match?(/foo/)
    assert_false :foo.match?(/bar/)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
regexp-match-polyfill-1.0.1 test/test-regexp-match-polyfill.rb