Skip to content

Instantly share code, notes, and snippets.

@MarkPochert
Created May 19, 2011 13:39
Show Gist options
  • Save MarkPochert/980771 to your computer and use it in GitHub Desktop.
Save MarkPochert/980771 to your computer and use it in GitHub Desktop.
<div class="container">
<div class="content_white sub_content">
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }, :class => "simple_form user" ) do |f| %>
<%= devise_error_messages! %>
<div class="grid_12">
<fieldset>
<h3>Persönliche Daten</h3>
<ul class="contact_data_list">
<li>
<label for="user_email" class="email required">E-Mail <abbr title="required" class="asterisk">*</abbr></label>
<%= f.email_field :email, :class => "string email required width219 input_text input_email" %>
</li>
<li>
<label for="user_firstname" class="string optional">Vorname </label>
<%= f.text_field :first_name, :class => "string optional width240 input_text"%>
</li>
<li>
<label for="user_lastname" class="string optional">Nachname </label>
<%= f.text_field :last_name, :class => "string optional width240 input_text" %>
</li>
<li>
<label>Straße, Nr.</label>
<%= f.text_field :street, :class => "string optional input_text width183" %>
<%= f.text_field :house_number, :class => "string optional input_text width40" %>
</li>
<li>
<label>PLZ, Stadt</label>
<%= f.text_field :postcode, :class => "string optional input_text width40" %>
<%= f.text_field :city, :class => "string optional input_text width183" %>
</li>
<li>
<label for="user_phone" class="tel optional">Phone </label>
<%= f.text_field :phone_number, :class => "string tel optional input_text width240" %>
</li>
<li>
<label>Firma </label>
<%= f.text_field :company_name, :class => "string optional input_text width240" %>
</li>
<li>
<label for="user_password" class="password optional">Passwort </label>
<%= f.password_field :current_password, :class => "password optional width219 input_text input_pw" %>
<div class="left ml100">
<p>
<small>Bestätigen Sie die Änderungen durch Eingabe Ihres Passworts</small>
</p>
</div>
</li>
</ul>
</fieldset>
</div>
</div>
<div style="margin-top:250px;margin-right:200px" class="right">
<%= f.submit "Update", :class => "button right" %>
</div>
<% end %>
</div>
</div>
Scenario: Edit Company Name # features/user_edit.feature:6
Given I am signed up and signed in with "test@example.com" # features/step_definitions/session_steps.rb:12
And I am on the home page # features/step_definitions/web_steps.rb:44
When I follow "My Info" # features/step_definitions/web_steps.rb:56
And I fill in "user[company_name]" with "Royal Snoker Casino" # features/step_definitions/web_steps.rb:60
And I fill in "user[current_password]" with "secret" # features/step_definitions/web_steps.rb:60
And I press "Update" # features/step_definitions/web_steps.rb:52
undefined method `node_name' for nil:NilClass (NoMethodError)
./features/step_definitions/web_steps.rb:53:in `/^(?:|I )press "([^"]*)"$/'
features/user_edit.feature:12:in `And I press "Update"'
And I follow "My Info" # features/step_definitions/web_steps.rb:56
Then the "Company name" field should contain "Royal Snoker Casino" # features/step_definitions/web_steps.rb:141
Failing Scenarios:
cucumber features/user_edit.feature:6 # Scenario: Edit Company Name
1 scenario (1 failed)
8 steps (1 failed, 2 skipped, 5 passed)
0m1.253s
Scenario: Edit Company Name
Given I am signed up and signed in with "test@example.com"
And I am on the home page
When I follow "My Info"
And I fill in "user[company_name]" with "Royal Snoker Casino"
And I fill in "user[current_password]" with "secret"
And I press "Update"
And I follow "My Info"
Then the "Company name" field should contain "Royal Snoker Casino"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment