Sha256: ed2b86534f5d070190614bedefa0eb033bec479d1044a086a5d22ba8b58fc5f7
Contents?: true
Size: 452 Bytes
Versions: 4
Compression:
Stored size: 452 Bytes
Contents
require 'spec_helper' describe <%= class_name %>Serializer do subject { <%= class_name %>Serializer.new(<%= singular_table_name %>) } let(:<%= singular_table_name %>) { FactoryGirl.build(:<%= singular_table_name %>) } let(:json) { JSON.parse(subject.to_json) } let(:root) { json.fetch('<%= singular_table_name %>') } it 'should be JSON' do root.fetch('pid') root.fetch('area').should == <%= singular_table_name %>.area.pid end end
Version data entries
4 entries across 4 versions & 1 rubygems