Add Spinach feature for Commit breadcrumbs

This commit is contained in:
Robert Speicher 2012-11-01 17:57:44 -04:00
parent badb092a2d
commit b1be377fb0
3 changed files with 17 additions and 0 deletions

View file

@ -42,4 +42,13 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
page.should have_content "Commits (1)"
page.should have_content "Showing 2 changed files"
end
Then 'I see breadcrumb links' do
page.should have_selector('ul.breadcrumb')
page.should have_selector('ul.breadcrumb span.divider', count: 3)
page.should have_selector('ul.breadcrumb a', count: 4)
find('ul.breadcrumb li:first a')['href'].should match(/#{@project.path}\/commits\/master\z/)
find('ul.breadcrumb li:last a')['href'].should match(%r{master/app/models/project\.rb\z})
end
end