Sha256: c2bc219a26e3d86e97787b436158d2079126acec1428a1bcba9f053ec2ce11aa
Contents?: true
Size: 666 Bytes
Versions: 3
Compression:
Stored size: 666 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Environment, '#schema' do let(:repositories) { Hash.new } let(:object) { Environment.build(repositories) } let(:block) { -> { } } fake(:schema) before do fake_class(Schema, build: -> { schema }) end describe 'with a block' do subject { object.schema(&block) } it 'calls the schema' do expect(subject).to be(schema) expect(schema).to have_received.call end end describe 'without a block' do subject { object.schema } it 'calls the schema' do expect(subject).to be(schema) expect(schema).not_to have_received.call end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rom-relation-0.1.2 | spec/unit/rom/environment/schema_spec.rb |
rom-relation-0.1.1 | spec/unit/rom/environment/schema_spec.rb |
rom-relation-0.1.0 | spec/unit/rom/environment/schema_spec.rb |