Sha256: 3d34f4de0d3dcfe127390eb47acfa328c837c9b655c485a19b0bfc7355f5d4ce
Contents?: true
Size: 877 Bytes
Versions: 21
Compression:
Stored size: 877 Bytes
Contents
require 'test/unit' require 'openid/extras' class StartsWithTestCase < Test::Unit::TestCase def test_starts_with [["anything", ""], ["something else", ""], ["", ""], ["foos", "foo"], ].each{|str,target| assert(str.starts_with?(target))} end def test_not_starts_with [["x", "y"], ["foos", "ball"], ["xx", "xy"], ].each{|str,target| assert(!(str.starts_with? target)) } end def test_ends_with [["anything", ""], ["something else", " else"], ["", ""], ["foos", "oos"], ].each{|str,target| assert(str.ends_with?(target))} end def test_not_ends_with [["x", "y"], ["foos", "ball"], ["xx", "xy"], ["foosball", "foosbal"], ].each{|str,target| assert(!(str.ends_with? target)) } end end
Version data entries
21 entries across 21 versions & 3 rubygems