Skip to content

Instantly share code, notes, and snippets.

View Supro's full-sized avatar

Budnikov Roman Olegovich Supro

View GitHub Profile
@Supro
Supro / active_model_serializers_rspec.rb
Last active December 26, 2015 11:09
ActiveModelSerializers example
### spec/serializers/building_spec.rb
require "spec_helper"
describe BuildingSerializer do
include Rails.application.routes.url_helpers
let(:room) { create :room }
let(:building) { room.building }
let(:hash) { BuildingSerializer.new(building).serializable_hash }