스핑크스 검색 테스트를 위해 테스트를 작성하려고합니다. 사용자가 api에 일부 매개 변수를 전달하고 params shpinx를 기반으로 검색을 수행해야합니다.작성된 순서대로 테스트를 실행하는 방법?
내가 test_helper.rb에서 테스트
3 다음 한 나는 모든
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
그들이 쓰여졌지 만 2nd, 3rd, 1st thay가 쓰여지는 순서대로 테스트를 수행 할 수 있습니까? 기본 Rails Test :: Unit을 사용하고 있습니다. 시험 세부 사항 때문에 제게 큰 문제가됩니다. 덕분에 .