Module: ChefSpec::API::EcomDevMatcherMultilineString
- Defined in:
- lib/ecomdev/chefspec/api/matchers/multiline_string.rb
Instance Method Summary collapse
- #contain_full_line(match) ⇒ Object
- #contain_line(match) ⇒ Object
- #end_line_with(match) ⇒ Object
- #start_line_with(match) ⇒ Object
Instance Method Details
#contain_full_line(match) ⇒ Object
22 23 24 25 26 |
# File 'lib/ecomdev/chefspec/api/matchers/multiline_string.rb', line 22 def contain_full_line(match) EcomDev::ChefSpec::Helpers::StringMatcher.instance_eval do matcher(regexp(match, '^\s*', '\s*$')) end end |
#contain_line(match) ⇒ Object
16 17 18 19 20 |
# File 'lib/ecomdev/chefspec/api/matchers/multiline_string.rb', line 16 def contain_line(match) EcomDev::ChefSpec::Helpers::StringMatcher.instance_eval do matcher(regexp(match, '^.*', '.*$')) end end |
#end_line_with(match) ⇒ Object
10 11 12 13 14 |
# File 'lib/ecomdev/chefspec/api/matchers/multiline_string.rb', line 10 def end_line_with(match) EcomDev::ChefSpec::Helpers::StringMatcher.instance_eval do matcher(regexp(match, '', '$')) end end |
#start_line_with(match) ⇒ Object
4 5 6 7 8 |
# File 'lib/ecomdev/chefspec/api/matchers/multiline_string.rb', line 4 def start_line_with(match) EcomDev::ChefSpec::Helpers::StringMatcher.instance_eval do matcher(regexp(match, '^')) end end |