Class: Wukong::SpecHelpers::JsonMatcher
- Inherits:
-
UnitTestMatcher
- Object
- UnitTestMatcher
- Wukong::SpecHelpers::JsonMatcher
- Defined in:
- lib/wukong/spec_helpers/unit_tests/unit_test_matchers.rb
Instance Attribute Summary
Attributes inherited from UnitTestMatcher
#actual_record, #driver, #expected, #expected_record, #mismatched_index, #reason
Instance Method Summary collapse
Methods inherited from UnitTestMatcher
#failure_message, #initialize, #matches?, #negative_failure_message, #records
Constructor Details
This class inherits a constructor from Wukong::SpecHelpers::UnitTestMatcher
Instance Method Details
#output ⇒ Object
109 110 111 112 113 114 115 116 117 |
# File 'lib/wukong/spec_helpers/unit_tests/unit_test_matchers.rb', line 109 def output driver.map do |record| begin MultiJson.load(record) rescue => e raise Error.new("Could not parse output of dataflow as JSON: \n\n#{record}") end end end |
#parse_modifier ⇒ Object
118 119 120 |
# File 'lib/wukong/spec_helpers/unit_tests/unit_test_matchers.rb', line 118 def parse_modifier ' (after parsing as JSON)' end |