aboutsummaryrefslogtreecommitdiffstats
path: root/actionsystemtest/lib/action_system_test/test_helpers/assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionsystemtest/lib/action_system_test/test_helpers/assertions.rb')
-rw-r--r--actionsystemtest/lib/action_system_test/test_helpers/assertions.rb40
1 files changed, 0 insertions, 40 deletions
diff --git a/actionsystemtest/lib/action_system_test/test_helpers/assertions.rb b/actionsystemtest/lib/action_system_test/test_helpers/assertions.rb
deleted file mode 100644
index edc8dbaa7f..0000000000
--- a/actionsystemtest/lib/action_system_test/test_helpers/assertions.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-module ActionSystemTest
- module TestHelpers
- # Assertions for system testing that aren't included by default in Capybara.
- # These are assertions that are useful specifically for Rails applications.
- module Assertions
- # Asserts that all of the provided selectors are present on the given page.
- #
- # assert_all_of_selectors('p', 'td')
- def assert_all_of_selectors(*items)
- options = items.extract_options!
- type = type_for_selector(items)
-
- items.each do |item|
- assert_selector type, item, options
- end
- end
-
- # Asserts that none of the provided selectors are present on the page.
- #
- # assert_none_of_selectors('ul', 'ol')
- def assert_none_of_selectors(*items)
- options = items.extract_options!
- type = type_for_selector(items)
-
- items.each do |item|
- assert_no_selector type, item, options
- end
- end
-
- private
- def type_for_selector(*items)
- if items.first.is_a?(Symbol)
- items.shift
- else
- Capybara.default_selector
- end
- end
- end
- end
-end