Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[TESTS] Fixed errors on Ruby 1.8

* Changed Ruby 1.9 hashes to hashrocket syntax
* Changed regex to allow different URL parts order
  • Loading branch information...
commit 74b2c8b0503d9668083008849d5d1f4baa58b7a2 1 parent 5bb8aa5
@karmi authored
Showing with 4 additions and 3 deletions.
  1. +2 −2 test/unit/index_test.rb
  2. +2 −1  test/unit/search_test.rb
View
4 test/unit/index_test.rb
@@ -875,10 +875,10 @@ def self.count; DATA.size; end
def index_something
@tags = ['block', 'scope', 'revenge']
- Index.any_instance.expects(:store).with(title: 'Title From Outer Space', tags: ['block', 'scope', 'revenge'])
+ Index.any_instance.expects(:store).with(:title => 'Title From Outer Space', :tags => ['block', 'scope', 'revenge'])
Tire::Index.new 'outer-space' do |index|
- index.store title: @my_title, tags: @tags
+ index.store :title => @my_title, :tags => @tags
end
end
View
3  test/unit/search_test.rb
@@ -20,7 +20,8 @@ class SearchTest < Test::Unit::TestCase
should "be initialized with multiple indices with options" do
indices = {'index1' => {:boost => 1},'index2' => {:boost => 2}}
s = Search::Search.new(indices) { query { string 'foo' } }
- assert_match %r|/index1,index2/_search|, s.url
+ assert_match /index1/, s.url
+ assert_match /index2/, s.url
assert_equal({'index1' => 1, 'index2' => 2}, s.to_hash[:indices_boost])
end
Please sign in to comment.
Something went wrong with that request. Please try again.