Class: TestXml::Spec::MatchXml
- Inherits:
-
Object
- Object
- TestXml::Spec::MatchXml
- Includes:
- Matchers
- Defined in:
- lib/test_xml/spec.rb
Instance Method Summary collapse
- #failure_message_for_should ⇒ Object
- #failure_message_for_should_not ⇒ Object
-
#initialize(expected, compare_values = false) ⇒ MatchXml
constructor
A new instance of MatchXml.
- #matches?(actual) ⇒ Boolean
Methods included from Matchers
Constructor Details
#initialize(expected, compare_values = false) ⇒ MatchXml
Returns a new instance of MatchXml.
6 7 8 9 |
# File 'lib/test_xml/spec.rb', line 6 def initialize(expected, compare_values = false) @expected = expected @compare_values = compare_values end |
Instance Method Details
#failure_message_for_should ⇒ Object
16 17 18 |
# File 'lib/test_xml/spec.rb', line 16 def "expected\n#{@actual} to match#{}\n#{@expected}" end |
#failure_message_for_should_not ⇒ Object
20 21 22 |
# File 'lib/test_xml/spec.rb', line 20 def "expected\n#{@actual} not to match#{}\n#{@expected}" end |
#matches?(actual) ⇒ Boolean
11 12 13 14 |
# File 'lib/test_xml/spec.rb', line 11 def matches?(actual) @actual = actual match_xml?(@actual, @expected, @compare_values) end |