<% @page_title = 'Setup' -%> <% if defined?(@session_wiped) or @cleared_tables.any? or @loaded_fixtures.any? -%>
<% if defined?(@session_wiped) -%>

The session is wiped clean.

<% end-%> <% if @cleared_tables.any? -%>

The following database tables are cleared:

<% end -%> <% if @loaded_fixtures.any? -%>

The following fixtures are loaded:

<% end -%>
<% end -%>

This page can be used to setup your Selenium tests. The following options can be used:

keep_session
Per default the session is reset, so add keep_session in order to keep the current session.
open<%= url_for %>?keep_session 
fixtures
Loads one or many fixtures into the database. This will destroy the current data you have in your database! Use all as name in order to load all fixtures, or specify which fixtures that should be loaded (delimited by commas).
If a test needs different data than you have in your fixtures, you can add another fixture set. A fixture set is just a sub directory in /test/fixtures/ where you can add alternate fixtures (e.g. /test/fixtures/blank/users.yml).
open<%= url_for :fixtures => 'all' %> 
open<%= url_for :fixtures => 'fixture' %> 
open<%= url_for :fixtures => 'fixture_one' %>,fixture_two 
Available fixtures
<% fixtures = available_fixtures -%> <% for fixture_set in fixtures.keys.sort -%> In the <%= fixture_set.blank? ? 'default' : "#{fixture_set}" %> fixture set:
    <% fixtures[fixture_set].unshift fixture_set.blank? ? 'all' : "#{fixture_set}/all" -%> <% for fixture in fixtures[fixture_set] -%>
  • <%= fixture %>
  • <% end -%>
<% end -%>
clear_tables
Clears one or many database tables. Another way to do the same thing is to create an empty fixture in a new fixture set (see fixtures above).
open<%= url_for :clear_tables => 'sessions' %> 
open<%= url_for :clear_tables => 'sessions' %>,outgoing_messages