<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;If you are looking at this you have found out that the login steps don&amp;#8217;t work for your application. No worries though. By default these steps rely on a login controller and a User object to be available. The login controllers&amp;#8217; index page should contain a username and password field.&lt;/p&gt;
&lt;p&gt;Naturally not all applications will be built like that. Therefore it is very easy to customize them.&lt;/p&gt;
&lt;p&gt;Create a new file in the custom_steps dir with the following skeleton.&lt;/p&gt;
&lt;p&gt;File: &lt;strong&gt;my_own_login.rb&lt;/strong&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
module WebratStorySteps&lt;br /&gt;
  module Site&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Log in to the site with given username and password&lt;br /&gt;
    def login username, password&lt;br /&gt;
      visits login_path&lt;br /&gt;
      fills_in &amp;#8220;username&amp;#8221;, :with =&amp;gt; username&lt;br /&gt;
      fills_in &amp;#8220;password&amp;#8221;, :with =&amp;gt; password&lt;br /&gt;
      clicks_button&lt;br /&gt;
    end&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
	&lt;li&gt;Log out of the site&lt;br /&gt;
    def logout&lt;br /&gt;
      visits &amp;#8216;/login/destroy&amp;#8217;&lt;br /&gt;
    end&lt;/li&gt;
&lt;/ol&gt;
end
&lt;p&gt;end&lt;br /&gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;These are the defaults as they are in the plugin. Change them until your step succeeds :).&lt;/p&gt;</body>
  <created-at type="datetime">2008-08-19T12:47:53-07:00</created-at>
  <id type="integer">46966</id>
  <permalink>login-steps</permalink>
  <repository-id type="integer">43898</repository-id>
  <title>Login steps</title>
  <updated-at type="datetime">2008-08-19T12:50:08-07:00</updated-at>
  <user-id type="integer">13864</user-id>
</wiki>
