Class: RSpec::RubyContentMatcher
- Inherits:
-
Object
- Object
- RSpec::RubyContentMatcher
show all
- Defined in:
- lib/generator_spec/matchers/content/content_matcher.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
3
4
5
|
# File 'lib/generator_spec/matchers/content/content_matcher.rb', line 3
def content
@content
end
|
Instance Method Details
#debug_content ⇒ Object
17
18
19
|
# File 'lib/generator_spec/matchers/content/content_matcher.rb', line 17
def debug_content
puts "Content: #{content}" if RSpec::Generator.debug?
end
|
#failure_message ⇒ Object
9
10
11
|
# File 'lib/generator_spec/matchers/content/content_matcher.rb', line 9
def failure_message
debug_content
end
|
#matches?(content) ⇒ Boolean
5
6
7
|
# File 'lib/generator_spec/matchers/content/content_matcher.rb', line 5
def matches?(content)
@content = content
end
|
#negative_failure_message ⇒ Object
13
14
15
|
# File 'lib/generator_spec/matchers/content/content_matcher.rb', line 13
def negative_failure_message
debug_content
end
|