Я пытаюсь написать тест для тестирования поиска sphinx. Мне нужно, чтобы пользователь передавал некоторые параметры в api и на основе этих параметров shpinx выполнял поиск.Как запустить тесты, чтобы они были написаны?
У меня после 3 испытания
в test_helper.rb У меня есть все настроить
require 'factory_girl'
require 'thinking_sphinx/test'
ThinkingSphinx::Test.init
.........
class ActiveSupport::TestCase
self.use_transactional_fixtures = false
self.use_instantiated_fixtures = false
fixtures :all
И мои тесты
test "should 1st test" do
ThinkingSphinx::Test.start
# uthenticatoin and creating records in databese with Factory Girl
ThinkingSphinx::Test.index
get "some/path", {params}, @headers
assert_response :success
end
test "should 2nd test" do
# uthenticatoin and creating records in databese with Factory Girl
ThinkingSphinx::Test.index
get "some/path", {params}, @headers
assert_response :success
# other assertions
end
test "should 3rd test" do
# uthenticatoin and creating records in databese with Factory Girl
ThinkingSphinx::Test.index
get "some/path", {params}, @headers
assert_response :success
# other assertions
ThinkingSphinx::Test.stop
end
Я не знаю, почему мои тесты не участвуете, чтобы они написаны, но 2-й, 3-й, 1-й Как я могу выполнить тесты, чтобы они были написаны. Я использую базовый Rails Test :: Unit. Заказ имеет значение для меня, из-за особенностей теста. спасибо.