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