Define cucumber environment in .couchapprc

When you set-up a .couchapprc file you can define different databases, hosts ... for different environments (see couchapp doc).
To use these set-up when running cucumber I modify the env.rb mentioned here. It use the test environment defined in .couchapprc for cucumber scenarios.

Example .couchapprc file:


BrainDump: CouchDB link cheatsheet

Note: "File" and "folder" refer to a couchapp directory structure.

{prefix} = /{db}/_design/{application}
{list_function} = name of file in lists folder (without .js)
{show_function} = name of file in shows folder (without .js)
{view_function} = name of subfolder in views folder

functionality link function Read on
list {prefix}/_list/{list_function}/{view_function} function(head, req) CouchDB book
show {prefix}/_show/{show_function}/{doc_id} function(doc, req) CouchDB book
view {prefix}/_view/{view_function} map: function(doc)
reduce: function(keys, values, rereduce)
view parameter