Class: EqualWithOutOrderJson
- Inherits:
-
Object
- Object
- EqualWithOutOrderJson
- Defined in:
- lib/eq_json.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
-
#currentActualObj ⇒ Object
Returns the value of attribute currentActualObj.
-
#currentExpectedObj ⇒ Object
Returns the value of attribute currentExpectedObj.
-
#currentJsonKey ⇒ Object
Returns the value of attribute currentJsonKey.
-
#expected ⇒ Object
Returns the value of attribute expected.
-
#jsonPath ⇒ Object
Returns the value of attribute jsonPath.
-
#jsonPathRoot ⇒ Object
Returns the value of attribute jsonPathRoot.
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#initialize(expected) ⇒ EqualWithOutOrderJson
constructor
A new instance of EqualWithOutOrderJson.
- #matches?(actual) ⇒ Boolean
Constructor Details
#initialize(expected) ⇒ EqualWithOutOrderJson
Returns a new instance of EqualWithOutOrderJson.
10 11 12 13 14 15 |
# File 'lib/eq_json.rb', line 10 def initialize(expected) @expected = expected @jsonPathRoot = "$." @jsonPath = @jsonPathRoot = EqJsonMessageGenerator.new(self) end |
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def actual @actual end |
#currentActualObj ⇒ Object
Returns the value of attribute currentActualObj.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def currentActualObj @currentActualObj end |
#currentExpectedObj ⇒ Object
Returns the value of attribute currentExpectedObj.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def currentExpectedObj @currentExpectedObj end |
#currentJsonKey ⇒ Object
Returns the value of attribute currentJsonKey.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def currentJsonKey @currentJsonKey end |
#expected ⇒ Object
Returns the value of attribute expected.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def expected @expected end |
#jsonPath ⇒ Object
Returns the value of attribute jsonPath.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def jsonPath @jsonPath end |
#jsonPathRoot ⇒ Object
Returns the value of attribute jsonPathRoot.
7 8 9 |
# File 'lib/eq_json.rb', line 7 def jsonPathRoot @jsonPathRoot end |
Instance Method Details
#description ⇒ Object
31 32 33 |
# File 'lib/eq_json.rb', line 31 def description "Excpect {@expected}" end |
#failure_message ⇒ Object
23 24 25 |
# File 'lib/eq_json.rb', line 23 def return @failureMessage end |
#failure_message_when_negated ⇒ Object
27 28 29 |
# File 'lib/eq_json.rb', line 27 def "Expeced failure_message_when_nagated" end |
#matches?(actual) ⇒ Boolean
17 18 19 20 21 |
# File 'lib/eq_json.rb', line 17 def matches?(actual) @actual = actual matchesObject?(@expected, @actual) end |