Sha256: 96c2dac7d2a38550bbc180b58a2237a5b90655e45796a2c0f32da4ec0af4ee90
Contents?: true
Size: 665 Bytes
Versions: 2
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' shared_examples 'a model wrapper' do describe '#name' do it 'returns the model name' do expect(model.name).to eq('document') end end describe '#plural' do it 'returns the model name pluralized' do expect(model.plural).to eq('documents') end end describe '#klass' do it 'returns the class of the model' do expect(model.klass).to eq(Document) end end end describe Azeroth::Model do subject(:model) { described_class.new(input) } context 'when initializing with symbol' do let(:input) { :document } it_behaves_like 'a model wrapper' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
azeroth-0.0.6 | spec/lib/azeroth/model_spec.rb |
azeroth-0.0.5 | spec/lib/azeroth/model_spec.rb |