Commit 5a08dcd26ee50678ee259eccaa5b1722a131142f

Authored by Andrew Kane
1 parent 234ad739

More flexible minitest dependency

searchkick.gemspec
... ... @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22 22 spec.add_dependency "elasticsearch", ">= 1"
23 23 spec.add_dependency "hashie"
24 24  
25   - spec.add_development_dependency "bundler", "~> 1.3"
  25 + spec.add_development_dependency "bundler", "~> 1.6"
26 26 spec.add_development_dependency "rake"
27   - spec.add_development_dependency "minitest", "~> 4.7"
  27 + spec.add_development_dependency "minitest"
28 28 end
... ...
test/autocomplete_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestAutocomplete < Minitest::Unit::TestCase
  3 +class TestAutocomplete < Minitest::Test
4 4  
5 5 def test_autocomplete
6 6 store_names ["Hummus"]
... ...
test/boost_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestBoost < Minitest::Unit::TestCase
  3 +class TestBoost < Minitest::Test
4 4  
5 5 # conversions
6 6  
... ...
test/facets_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestFacets < Minitest::Unit::TestCase
  3 +class TestFacets < Minitest::Test
4 4  
5 5 def setup
6 6 super
... ...
test/highlight_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestHighlight < Minitest::Unit::TestCase
  3 +class TestHighlight < Minitest::Test
4 4  
5 5 def test_basic
6 6 store_names ["Two Door Cinema Club"]
... ...
test/index_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestIndex < Minitest::Unit::TestCase
  3 +class TestIndex < Minitest::Test
4 4  
5 5 def test_clean_indices
6 6 old_index = Searchkick::Index.new("products_test_20130801000000000")
... ...
test/inheritance_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestInheritance < Minitest::Unit::TestCase
  3 +class TestInheritance < Minitest::Test
4 4  
5 5 def test_child_reindex
6 6 store_names ["Max"], Cat
... ...
test/match_test.rb
... ... @@ -2,7 +2,7 @@
2 2  
3 3 require_relative "test_helper"
4 4  
5   -class TestMatch < Minitest::Unit::TestCase
  5 +class TestMatch < Minitest::Test
6 6  
7 7 # exact
8 8  
... ...
test/model_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestModel < Minitest::Unit::TestCase
  3 +class TestModel < Minitest::Test
4 4  
5 5 def test_disable_callbacks_model
6 6 store_names ["product a"]
... ...
test/query_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestQuery < Minitest::Unit::TestCase
  3 +class TestQuery < Minitest::Test
4 4  
5 5 def test_basic
6 6 store_names ["Milk", "Apple"]
... ...
test/reindex_job_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestReindexJob < Minitest::Unit::TestCase
  3 +class TestReindexJob < Minitest::Test
4 4  
5 5 def setup
6 6 super
... ...
test/should_index_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestShouldIndex < Minitest::Unit::TestCase
  3 +class TestShouldIndex < Minitest::Test
4 4  
5 5 def test_basic
6 6 store_names ["INDEX", "DO NOT INDEX"]
... ...
test/similar_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestSimilar < Minitest::Unit::TestCase
  3 +class TestSimilar < Minitest::Test
4 4  
5 5 def test_similar
6 6 store_names ["Annie's Naturals Organic Shiitake & Sesame Dressing"]
... ...
test/sql_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestSql < Minitest::Unit::TestCase
  3 +class TestSql < Minitest::Test
4 4  
5 5 def test_limit
6 6 store_names ["Product A", "Product B", "Product C", "Product D"]
... ...
test/suggest_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestSuggest < Minitest::Unit::TestCase
  3 +class TestSuggest < Minitest::Test
4 4  
5 5 def test_basic
6 6 store_names ["Great White Shark", "Hammerhead Shark", "Tiger Shark"]
... ...
test/synonyms_test.rb
1 1 require_relative "test_helper"
2 2  
3   -class TestSynonyms < Minitest::Unit::TestCase
  3 +class TestSynonyms < Minitest::Test
4 4  
5 5 def test_bleach
6 6 store_names ["Clorox Bleach", "Kroger Bleach"]
... ...
test/test_helper.rb
... ... @@ -6,6 +6,8 @@ require &quot;logger&quot;
6 6  
7 7 ENV["RACK_ENV"] = "test"
8 8  
  9 +Minitest::Test = Minitest::Test unless defined?(Minitest::Test)
  10 +
9 11 File.delete("elasticsearch.log") if File.exists?("elasticsearch.log")
10 12 Searchkick.client.transport.logger = Logger.new("elasticsearch.log")
11 13  
... ... @@ -179,7 +181,7 @@ Product.reindex # run twice for both index paths
179 181 Store.reindex
180 182 Animal.reindex
181 183  
182   -class Minitest::Unit::TestCase
  184 +class Minitest::Test
183 185  
184 186 def setup
185 187 Product.destroy_all
... ...