Upgraded to open_id_authentication plugin at 00d8bc7f97 and unpacked ruby-openid gem version 2.1.2.

This commit is contained in:
Eric Allen 2008-12-08 00:44:09 -05:00
parent 6149900e0c
commit e92dae2ffc
227 changed files with 30857 additions and 669 deletions

View file

@ -0,0 +1,35 @@
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