Module: Canon::RSpecMatchers

Defined in:
lib/canon/rspec_matchers.rb

Defined Under Namespace

Classes: SerializationMatcher

Instance Method Summary collapse

Instance Method Details

#be_analogous_with(expected) ⇒ Object



116
117
118
# File 'lib/canon/rspec_matchers.rb', line 116

def be_analogous_with(expected)
  SerializationMatcher.new(expected, :xml)
end

#be_json_equivalent_to(expected) ⇒ Object



128
129
130
# File 'lib/canon/rspec_matchers.rb', line 128

def be_json_equivalent_to(expected)
  SerializationMatcher.new(expected, :json)
end

#be_serialization_equivalent_to(expected, format: :xml) ⇒ Object

Matcher methods



112
113
114
# File 'lib/canon/rspec_matchers.rb', line 112

def be_serialization_equivalent_to(expected, format: :xml)
  SerializationMatcher.new(expected, format)
end

#be_xml_equivalent_to(expected) ⇒ Object



120
121
122
# File 'lib/canon/rspec_matchers.rb', line 120

def be_xml_equivalent_to(expected)
  SerializationMatcher.new(expected, :xml)
end

#be_yaml_equivalent_to(expected) ⇒ Object



124
125
126
# File 'lib/canon/rspec_matchers.rb', line 124

def be_yaml_equivalent_to(expected)
  SerializationMatcher.new(expected, :yaml)
end