Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #74 from ranguba/test-check-mecab-availability
Browse files Browse the repository at this point in the history
test: check mecab availability
  • Loading branch information
kou committed Apr 2, 2015
2 parents 4a12980 + 15d5b60 commit 03fe504
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions test/groonga-test-utils.rb
Expand Up @@ -189,4 +189,8 @@ def need_self_recursive_equal
def need_encoding
omit("Encoding is needed.") unless defined?(::Encoding)
end

def check_mecab_availability
omit("MeCab isn't available") if context["TokenMecab"].nil?
end
end
5 changes: 1 addition & 4 deletions test/test-table-select-mecab.rb
Expand Up @@ -20,10 +20,7 @@ class TableSelectMecabTest < Test::Unit::TestCase

setup :setup_database

setup
def check_mecab_availability
omit("MeCab isn't available") if context["TokenMecab"].nil?
end
setup :check_mecab_availability

setup
def setup_tables
Expand Down
1 change: 1 addition & 0 deletions test/test-type.rb
Expand Up @@ -153,6 +153,7 @@ def test_trigram
end

def test_mecab
check_mecab_availability
assert_equal_type("TokenMecab", Groonga::Type::MECAB)
end
end
Expand Down

0 comments on commit 03fe504

Please sign in to comment.