Module: SerializationScopes::Shoulda::Matchers

Defined in:
lib/serialization_scopes/matchers.rb,
lib/serialization_scopes/matchers/serialize_matcher.rb

Defined Under Namespace

Classes: SerializeMatcher

Instance Method Summary collapse

Instance Method Details

#serializeObject

Ensures that records are serialized correctly

Example:

describe Article do
  it { should serialize }
  it { should serialize.to(:article) }
  it { should serialize.to(:article).with_attributes(6) }
  it { should serialize.for(:reader).to(:article).with_attributes(4) }
end


14
15
16
# File 'lib/serialization_scopes/matchers/serialize_matcher.rb', line 14

def serialize
  SerializeMatcher.new
end