Skip to content

Commit

Permalink
Added scenario and step for linking to the features source file if th…
Browse files Browse the repository at this point in the history
…e path is available
  • Loading branch information
baphled committed Jul 6, 2010
1 parent f4dd52b commit c8eb77f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
21 changes: 13 additions & 8 deletions features/plain/viewing_an_item.feature
@@ -1,11 +1,16 @@
Feature: Viewing an item
In order to keep the item views consistent
As a user
I want to see a consistent layout
In order to keep the item views consistent
As a user
I want to see a consistent layout

Scenario: Viewing a project should display a list of features
Given the project has features
And one of the projects features has a path
When I am on "project show" page
Then a feature with a path should display it
Scenario: Viewing a project should display a list of features
Given the project has features
And one of the projects features has a path
When I am on "project show" page
Then a feature with a path should display it

Scenario: The features path should be clickable
Given the project has features
And one of the projects features has a path
When I am on "project show" page
Then the path location should be a link
6 changes: 6 additions & 0 deletions features/step_definitions/projects_steps.rb
Expand Up @@ -439,3 +439,9 @@
content.should contain 'Path:'
end
end

Then /^the path location should be a link$/ do
response.should have_selector :b do |content|
content.should have_selector :a, attribute = {:href => "#{RAILS_ROOT}/features/tag_cloud.feature"}
end
end

0 comments on commit c8eb77f

Please sign in to comment.