Commit 5a08dcd26ee50678ee259eccaa5b1722a131142f
1 parent
234ad739
Exists in
master
and in
21 other branches
More flexible minitest dependency
Showing
17 changed files
with
20 additions
and
18 deletions
Show diff stats
searchkick.gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec| | @@ -22,7 +22,7 @@ Gem::Specification.new do |spec| | ||
22 | spec.add_dependency "elasticsearch", ">= 1" | 22 | spec.add_dependency "elasticsearch", ">= 1" |
23 | spec.add_dependency "hashie" | 23 | spec.add_dependency "hashie" |
24 | 24 | ||
25 | - spec.add_development_dependency "bundler", "~> 1.3" | 25 | + spec.add_development_dependency "bundler", "~> 1.6" |
26 | spec.add_development_dependency "rake" | 26 | spec.add_development_dependency "rake" |
27 | - spec.add_development_dependency "minitest", "~> 4.7" | 27 | + spec.add_development_dependency "minitest" |
28 | end | 28 | end |
test/autocomplete_test.rb
test/boost_test.rb
test/facets_test.rb
test/highlight_test.rb
test/index_test.rb
1 | require_relative "test_helper" | 1 | require_relative "test_helper" |
2 | 2 | ||
3 | -class TestIndex < Minitest::Unit::TestCase | 3 | +class TestIndex < Minitest::Test |
4 | 4 | ||
5 | def test_clean_indices | 5 | def test_clean_indices |
6 | old_index = Searchkick::Index.new("products_test_20130801000000000") | 6 | old_index = Searchkick::Index.new("products_test_20130801000000000") |
test/inheritance_test.rb
test/match_test.rb
test/model_test.rb
test/query_test.rb
test/reindex_job_test.rb
test/should_index_test.rb
test/similar_test.rb
1 | require_relative "test_helper" | 1 | require_relative "test_helper" |
2 | 2 | ||
3 | -class TestSimilar < Minitest::Unit::TestCase | 3 | +class TestSimilar < Minitest::Test |
4 | 4 | ||
5 | def test_similar | 5 | def test_similar |
6 | store_names ["Annie's Naturals Organic Shiitake & Sesame Dressing"] | 6 | store_names ["Annie's Naturals Organic Shiitake & Sesame Dressing"] |
test/sql_test.rb
1 | require_relative "test_helper" | 1 | require_relative "test_helper" |
2 | 2 | ||
3 | -class TestSql < Minitest::Unit::TestCase | 3 | +class TestSql < Minitest::Test |
4 | 4 | ||
5 | def test_limit | 5 | def test_limit |
6 | store_names ["Product A", "Product B", "Product C", "Product D"] | 6 | store_names ["Product A", "Product B", "Product C", "Product D"] |
test/suggest_test.rb
1 | require_relative "test_helper" | 1 | require_relative "test_helper" |
2 | 2 | ||
3 | -class TestSuggest < Minitest::Unit::TestCase | 3 | +class TestSuggest < Minitest::Test |
4 | 4 | ||
5 | def test_basic | 5 | def test_basic |
6 | store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"] | 6 | store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"] |
test/synonyms_test.rb
test/test_helper.rb
@@ -6,6 +6,8 @@ require "logger" | @@ -6,6 +6,8 @@ require "logger" | ||
6 | 6 | ||
7 | ENV["RACK_ENV"] = "test" | 7 | ENV["RACK_ENV"] = "test" |
8 | 8 | ||
9 | +Minitest::Test = Minitest::Test unless defined?(Minitest::Test) | ||
10 | + | ||
9 | File.delete("elasticsearch.log") if File.exists?("elasticsearch.log") | 11 | File.delete("elasticsearch.log") if File.exists?("elasticsearch.log") |
10 | Searchkick.client.transport.logger = Logger.new("elasticsearch.log") | 12 | Searchkick.client.transport.logger = Logger.new("elasticsearch.log") |
11 | 13 | ||
@@ -179,7 +181,7 @@ Product.reindex # run twice for both index paths | @@ -179,7 +181,7 @@ Product.reindex # run twice for both index paths | ||
179 | Store.reindex | 181 | Store.reindex |
180 | Animal.reindex | 182 | Animal.reindex |
181 | 183 | ||
182 | -class Minitest::Unit::TestCase | 184 | +class Minitest::Test |
183 | 185 | ||
184 | def setup | 186 | def setup |
185 | Product.destroy_all | 187 | Product.destroy_all |