From 7379daad1c73bd3610ed296436250b417ac3673d Mon Sep 17 00:00:00 2001 From: hukl Date: Thu, 10 Feb 2011 14:19:00 +0100 Subject: removed thinking_sphinx plugin and replaced it with gem. also tuned dependencies --- .../features/step_definitions/search_steps.rb | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100644 vendor/plugins/thinking-sphinx/features/step_definitions/search_steps.rb (limited to 'vendor/plugins/thinking-sphinx/features/step_definitions/search_steps.rb') diff --git a/vendor/plugins/thinking-sphinx/features/step_definitions/search_steps.rb b/vendor/plugins/thinking-sphinx/features/step_definitions/search_steps.rb deleted file mode 100644 index 8c64dd77..00000000 --- a/vendor/plugins/thinking-sphinx/features/step_definitions/search_steps.rb +++ /dev/null @@ -1,66 +0,0 @@ -When /^I search for the specific id of (\d+) in the (\w+) index$/ do |id, index| - @id = id.to_i - @index = index -end - -When /^I search for the document id of (\w+) (\w+) in the (\w+) index$/ do |model, name, index| - model = model.gsub(/\s/, '_').camelize.constantize - @id = model.find_by_name(name).sphinx_document_id - @index = index -end - -Then "it should exist" do - ThinkingSphinx::Search.search_for_id(@id, @index).should == true -end - -Then "it should not exist" do - ThinkingSphinx::Search.search_for_id(@id, @index).should == false -end - -Then "it should exist if using Rails 2.1 or newer" do - require 'active_record/version' - unless ActiveRecord::VERSION::STRING.to_f < 2.1 - ThinkingSphinx::Search.search_for_id(@id, @index).should == true - end -end - -Then "it should not exist if using Rails 2.1 or newer" do - require 'active_record/version' - unless ActiveRecord::VERSION::STRING.to_f < 2.1 - ThinkingSphinx::Search.search_for_id(@id, @index).should == false - end -end - -Then /^I can iterate by result and group and count$/ do - results.each_with_groupby_and_count do |result, group, count| - result.should be_kind_of(@model) - count.should be_kind_of(Integer) - group.should be_kind_of(Integer) - end -end - -Then "each result id should match the corresponding sphinx internal id" do - results.each_with_sphinx_internal_id do |result, id| - result.id.should == id - end -end - -Then "I should have an array of integers" do - results.each do |result| - result.should be_kind_of(Integer) - end -end - -Then "searching for ids should match the record ids of the normal search results" do - normal_results = results - - # reset search, switch method - @results = nil - @method = :search_for_ids - - results.should == normal_results.collect(&:id) -end - -Then /^I should get a value of (\d+)$/ do |count| - results.should == count.to_i -end \ No newline at end of file -- cgit v1.3