How can I get a rails server to use the same databse that cucumber uses during a test?

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-04-15T04:49:00Z Indexed on 2010/04/15 4:53 UTC
Read the original article Hit count: 271

Filed under:
|
|
|

The cucumber test first makes an entry in the database and posts a form to a second server. This second server does some processing in background and then hits the first app (where the test is being run) with some data that the cucumber test needs to know about.

I've tried running the main server via script/server and script/server -e test while the cucumber test is running, but I can't seem to force the server to use the same database that cucumber is using when it runs its step definitions. That is, when the second server pushes some data to a controller in the main server, the main server doesn't know about any entries that cucumber has made in the database. How can I get cucumber and the main server to use the same database?

© Stack Overflow or respective owner

Related posts about cucumber

Related posts about rails