Sha256: b6cf942e7e01a31795632b0c9aedd54c8d41693fbf9e228a9efff69649c8f4ed

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

require 'spec_helper'

describe <%= class_name %>Serializer do
  subject { <%= class_name %>Serializer.new(<%= singular_table_name %>) }
  let(:<%= singular_table_name %>) { FactoryGirl.create(:<%= singular_table_name %>) }
  let(:json) { JSON.parse(subject.to_json) }
  let(:root) { json.fetch('<%= singular_table_name %>') }
  it 'should be JSON' do
    expect(root.fetch('id')).to eq(<%= singular_table_name %>.to_param)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
curate-0.1.1 lib/generators/curate/curation_concern/templates/curation_concern_serializer_spec.rb.erb