Class: RSpec::RubyContentMatchers::HaveRegion
- Inherits:
-
RSpec::RubyContentMatcher
- Object
- RSpec::RubyContentMatcher
- RSpec::RubyContentMatchers::HaveRegion
- Defined in:
- lib/code_spec/matchers/have_region.rb
Constant Summary
Constants inherited from RSpec::RubyContentMatcher
RSpec::RubyContentMatcher::ANY_GROUP, RSpec::RubyContentMatcher::LPAR, RSpec::RubyContentMatcher::OPT_ARGS, RSpec::RubyContentMatcher::OPT_SPACES, RSpec::RubyContentMatcher::Q_ANY_GROUP, RSpec::RubyContentMatcher::RPAR, RSpec::RubyContentMatcher::SPACES
Instance Attribute Summary collapse
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Attributes inherited from RSpec::RubyContentMatcher
#alt_end, #content, #content_matches, #end_option
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(region) ⇒ HaveRegion
constructor
A new instance of HaveRegion.
- #negative_failure_message ⇒ Object
Methods inherited from RSpec::RubyContentMatcher
#any_args_expr, #args_expr, #args_msg, #comment_end, #debug, #debug?, #debug_content, #display, #display_content, #get_expr, #handle_result, #index, #indexes, #is_match?, #matches?, #opt
Constructor Details
#initialize(region) ⇒ HaveRegion
Returns a new instance of HaveRegion.
5 6 7 8 |
# File 'lib/code_spec/matchers/have_region.rb', line 5 def initialize(region) @region = region.to_s super @region end |
Instance Attribute Details
#region ⇒ Object (readonly)
Returns the value of attribute region.
3 4 5 |
# File 'lib/code_spec/matchers/have_region.rb', line 3 def region @region end |
Instance Method Details
#failure_message ⇒ Object
10 11 12 13 |
# File 'lib/code_spec/matchers/have_region.rb', line 10 def super display "Expected there to be a #{region} region" end |
#negative_failure_message ⇒ Object
15 16 17 18 |
# File 'lib/code_spec/matchers/have_region.rb', line 15 def super display "Did no expected there to be a #{region} region" end |