Skip to content

Instantly share code, notes, and snippets.

$ cucumber --profile wip
Using the wip profile...
Feature: Manage locations
In order to manage locations
As a user
I want to create and edit my locations.
@wip
Scenario: Create a new location # features/manage_locations.feature:19
Given I am on new location page # features/step_definitions/location_steps.rb:22
match "locations/show/(:id)" => 'locations#show', :as => :location
@wip
Scenario: Create a new location
Given I am on the es site
And I am on new location page
And I fill in "Nombre" with "Shiny location"
When I press "crear"
Then I should see "Shiny location"
$ cucumber
Using the default profile...
Feature: Manage locations
In order to manage locations
As a user
I want to create and edit my locations.
Scenario: List a location. # features/manage_locations.feature:6
Given there is a location named "location 1" # features/step_definitions/location_steps.rb:1
When I am on the locations page # features/step_definitions/location_steps.rb:5
Given /^I am on new location page$/ do
visit(new_locations_path)
end
match 'locations/new' => 'locations#new', :as => :new_locations
$ cucumber --profile wip
Using the wip profile...
Feature: Manage locations
In order to manage locations
As a user
I want to create and edit my locations.
@wip
Scenario: Create a new location # features/manage_locations.feature:19
Given I am on new location page # features/step_definitions/location_steps.rb:22
# GET /locations/new
# GET /locations/new.json
def new
@location = Location.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @location }
end
end
$ cucumber --profile wip
Using the wip profile...
Feature: Manage locations
In order to manage locations
As a user
I want to create and edit my locations.
@wip
Scenario: Create a new location # features/manage_locations.feature:19
Given I am on new location page # features/step_definitions/location_steps.rb:22
<%= form_for(@location) do |f| %>
<p>
<%= f.label :name %>
<%= f.text_field :name %>
</p>
<p>
<%= f.submit %>
</p>
<% end %>