* Add object_serializer_class_methods_examples * Change to require spec/shared/examples in every spec files * Refactor object_serializer_class_methods_spec
10 lines
444 B
Ruby
10 lines
444 B
Ruby
RSpec.shared_examples 'returning correct relationship hash' do |serializer, id_method_name, record_type|
|
|
it 'returns correct relationship hash' do
|
|
expect(relationship).to be_instance_of(Hash)
|
|
expect(relationship.keys).to all(be_instance_of(Symbol))
|
|
expect(relationship[:serializer]).to be serializer
|
|
expect(relationship[:id_method_name]).to be id_method_name
|
|
expect(relationship[:record_type]).to be record_type
|
|
end
|
|
end
|