Module: RspecW3cMatchers::InstanceMethods
- Defined in:
- lib/rspec_w3c_matchers/matchers.rb
Overview
Contains RSPEC 2.0 instance methods. To use the matchers in RSPEC 2.0, include this module inside your RSPEC config block inside of spec_helper.rb
Rspec.configure do |config|
config.include(RspecW3cMatchers::InstanceMethods)
end
To use matchers in Cucumber steps, simply include this module inside any step definitions:
include RspecW3cMatchers::InstanceMethods
Instance Method Summary collapse
-
#have_greater_than_or_equal_to_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing >= specified number of errors.
-
#have_greater_than_or_equal_to_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing >= specified number of warnings.
-
#have_less_than_or_equal_to_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing <= specified number of errors.
-
#have_less_than_or_equal_to_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing <= specified number of warnings.
-
#have_less_than_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing < specified number of errors.
-
#have_less_than_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing < specified number of warnings.
-
#have_more_than_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing > specified number of errors.
-
#have_more_than_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing > specified number of warnings.
-
#have_no_w3c_errors_in(page) ⇒ Object
matcher for detecting zero errors.
-
#have_no_w3c_warnings_in(page) ⇒ Object
matcher for detecting zero warnings.
-
#have_specified_number_of_w3c_errors_in(page, number) ⇒ Object
matcher for detecting expected number of errors.
-
#have_specified_number_of_w3c_warnings_in(page, number) ⇒ Object
matcher for detecting expected number of warnings.
-
#have_w3c_errors_in(page) ⇒ Object
matcher for detecting >0 errors.
-
#have_w3c_warnings_in(page) ⇒ Object
matcher for detecting >0 errors.
Instance Method Details
#have_greater_than_or_equal_to_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing >= specified number of errors
56 57 58 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 56 def have_greater_than_or_equal_to_specified_number_of_errors_in(page,number) RspecW3cMatchers::Notices.new(page,:>=,number,:errors) end |
#have_greater_than_or_equal_to_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing >= specified number of warnings
61 62 63 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 61 def have_greater_than_or_equal_to_specified_number_of_warnings_in(page,number) RspecW3cMatchers::Notices.new(page,:>=,number,:warnings) end |
#have_less_than_or_equal_to_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing <= specified number of errors
76 77 78 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 76 def have_less_than_or_equal_to_specified_number_of_errors_in(page,number) RspecW3cMatchers::Notices.new(page,:<=,number,:errors) end |
#have_less_than_or_equal_to_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing <= specified number of warnings
81 82 83 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 81 def have_less_than_or_equal_to_specified_number_of_warnings_in(page,number) RspecW3cMatchers::Notices.new(page,:<=,number,:warnings) end |
#have_less_than_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing < specified number of errors
66 67 68 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 66 def have_less_than_specified_number_of_errors_in(page,number) RspecW3cMatchers::Notices.new(page,:<,number,:errors) end |
#have_less_than_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing < specified number of warnings
71 72 73 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 71 def have_less_than_specified_number_of_warnings_in(page,number) RspecW3cMatchers::Notices.new(page,:<,number,:warnings) end |
#have_more_than_specified_number_of_errors_in(page, number) ⇒ Object
matcher for detecing > specified number of errors
46 47 48 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 46 def have_more_than_specified_number_of_errors_in(page,number) RspecW3cMatchers::Notices.new(page,:>,number,:errors) end |
#have_more_than_specified_number_of_warnings_in(page, number) ⇒ Object
matcher for detecing > specified number of warnings
51 52 53 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 51 def have_more_than_specified_number_of_warnings_in(page,number) RspecW3cMatchers::Notices.new(page,:>,number,:warnings) end |
#have_no_w3c_errors_in(page) ⇒ Object
matcher for detecting zero errors
15 16 17 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 15 def have_no_w3c_errors_in(page) RspecW3cMatchers::Notices.new(page,:==,0,:errors) end |
#have_no_w3c_warnings_in(page) ⇒ Object
matcher for detecting zero warnings
20 21 22 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 20 def have_no_w3c_warnings_in(page) RspecW3cMatchers::Notices.new(page,:==,0,:warnings) end |
#have_specified_number_of_w3c_errors_in(page, number) ⇒ Object
matcher for detecting expected number of errors
36 37 38 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 36 def have_specified_number_of_w3c_errors_in(page,number) RspecW3cMatchers::Notices.new(page,:==,number,:errors) end |
#have_specified_number_of_w3c_warnings_in(page, number) ⇒ Object
matcher for detecting expected number of warnings
41 42 43 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 41 def have_specified_number_of_w3c_warnings_in(page,number) RspecW3cMatchers::Notices.new(page,:==,number,:warnings) end |
#have_w3c_errors_in(page) ⇒ Object
matcher for detecting >0 errors
25 26 27 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 25 def have_w3c_errors_in(page) RspecW3cMatchers::Notices.new(page,:>,0,:errors) end |
#have_w3c_warnings_in(page) ⇒ Object
matcher for detecting >0 errors
30 31 32 |
# File 'lib/rspec_w3c_matchers/matchers.rb', line 30 def have_w3c_warnings_in(page) RspecW3cMatchers::Notices.new(page,:>,0,:warnings) end |