Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Note the different port for the test environment.

  • Loading branch information...
commit 1688e84f92b7453dcd581e75be222f81d6cf3083 1 parent 2009d13
@pat authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 ts/en/testing.textile
13 ts/en/testing.textile
@@ -7,6 +7,13 @@ h2. Testing with Thinking Sphinx
Before you get caught up in the specifics of testing Thinking Sphinx using certain tools, it's worth noting that no matter what the approach, you'll need to turn off transactional fixtures and index your data after creating the appropriate records - otherwise you won't get any search results.
+Also: make sure you have your test environment using a different port number in @config/sphinx.yml@ - otherwise you won't be able to run Sphinx in your development environment _and_ your tests at the same time.
+{% highlight yaml %}
+ port: 9313
+{% endhighlight %}
<li><a href="#unit_tests">Unit Tests and Specs</a></li>
<li><a href="#cucumber">Cucumber</a></li>
@@ -88,7 +95,7 @@ You can turn off transactional features on a per-test basis within the test clas
{% highlight ruby %}
class SearchControllerTest
self.use_transactional_fixtures = false
# ...
{% endhighlight %}
@@ -106,10 +113,10 @@ However, you probably don't want Sphinx running for your unit tests, and so it's
{% highlight ruby %}
test "Searching for Articles" do
get :index
assert [@article], assigns[:articles]
{% endhighlight %}
Please sign in to comment.
Something went wrong with that request. Please try again.