Note: I’m on Rails version 2.3.8
Hello,
I’m running integration tests on my controllers with a Watir-controller Firefox. So two processes are running at the same time:
Process 1: Mongrel server in test environment (script/server -e test)
Process 2: ActionController::IntegrationTest running (also in Test environment, obviously)
A Product can be bought by a customer (Account) through a Subscription object.
This is what happens:
-
IntegrationTest creates a new Product by saying Factory.create :product
-
The browser is redirected to the Product’s page and buys the product.
-
After going through the payment gateway, a Subscription object is created by Process 1
-
However, Process 2 DOES NOT SEE that this object was created
-
The integration test fails
Going through this process manually in development mode does everything well, but I must automate this process. Any thoughts?