Navigation Menu

Skip to content

Commit

Permalink
test: split tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Masafumi Yokoyama committed Apr 2, 2015
1 parent b1f2e98 commit 980ba27
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions test/test-schema-type.rb
Expand Up @@ -201,14 +201,22 @@ def test_normalize_mecab
assert_normalize_type("TokenMecab", "TokenMecab")
end

def test_normalize_regexp
assert_normalize_type("TokenRegexp", "regexp")
assert_normalize_type("TokenRegexp", "token_regexp")
assert_normalize_type("TokenRegexp", "TokenRegexp")
end

private
def assert_normalize_type(expected, type)
assert_equal(expected, Groonga::Schema.normalize_type(type))
end

class RegexpTest < self
def test_normalize_short_name
assert_normalize_type("TokenRegexp", "regexp")
end

def test_normalize_snake_case
assert_normalize_type("TokenRegexp", "token_regexp")
end

def test_normalize_camel_case
assert_normalize_type("TokenRegexp", "TokenRegexp")
end
end
end

0 comments on commit 980ba27

Please sign in to comment.