##// END OF EJS Templates
Adds ability to filter watched issues (#846)....
Adds ability to filter watched issues (#846). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2456 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2376:f70be197e0ae
r2395:e1b828de95ec
Show More
test_extras.rb
35 lines | 877 B | text/x-ruby | RubyLexer
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