This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match "locations/show/(:id)" => 'locations#show', :as => :location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given /^I am on new location page$/ do | |
visit(new_locations_path) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match 'locations/new' => 'locations#new', :as => :new_locations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(@location) do |f| %> | |
<p> | |
<%= f.label :name %> | |
<%= f.text_field :name %> | |
</p> | |
<p> | |
<%= f.submit %> | |
</p> | |
<% end %> |