- HashIncluding =
SuperDiff::ObjectInspection::InspectionTree.new do
add_text "#<a hash including ("
nested do |aliased_matcher|
insert_hash_inspection_of(
aliased_matcher.expecteds.first,
initial_break: nil,
)
end
add_break
add_text ")>"
end
- CollectionIncluding =
SuperDiff::ObjectInspection::InspectionTree.new do
def self.applies_to?(object)
SuperDiff::RSpec.a_collection_including?(object)
end
add_text "#<a collection including ("
nested do |aliased_matcher|
insert_array_inspection_of(aliased_matcher.expecteds)
end
add_break
add_text ")>"
end
- ObjectHavingAttributes =
SuperDiff::ObjectInspection::InspectionTree.new do
add_text "#<an object having attributes ("
nested do |aliased_matcher|
insert_hash_inspection_of(
aliased_matcher.expected,
initial_break: nil,
)
end
add_break
add_text ")>"
end
- CollectionContainingExactly =
SuperDiff::ObjectInspection::InspectionTree.new do
add_text "#<a collection containing exactly ("
nested do |aliased_matcher|
insert_array_inspection_of(aliased_matcher.expected)
end
add_break
add_text ")>"
end