aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/breadcrumb_features.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/breadcrumb_features.rb')
-rw-r--r--spec/support/breadcrumb_features.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/breadcrumb_features.rb b/spec/support/breadcrumb_features.rb
new file mode 100644
index 000000000..36bfce19c
--- /dev/null
+++ b/spec/support/breadcrumb_features.rb
@@ -0,0 +1,15 @@
+module BreadcrumbFeatures
+ def expect_breadcrumb_links *link_names
+ within('.breadcrumbs') do
+ all('a').zip( link_names ).each do | link_element, link_content |
+ within(link_element) do | |
+ expect(page).to have_content(link_content)
+ end
+ end
+ end
+ end
+end
+
+RSpec.configure do | conf |
+ conf.include BreadcrumbFeatures, type: :feature
+end