Sha256: b36aca0305411ce2001ff0b1bf21cd1b08449a35f7f9fc5742fecec8bcf048c8

Contents?: true

Size: 500 Bytes

Versions: 9

Compression:

Stored size: 500 Bytes

Contents

require 'spec_helper'
describe Domain, "coercions" do

  let(:domain){ Domain.scalar(:x, :y) }

  context 'without a block' do
    subject{ domain.coercions }

    it{ should be_a(Myrrha::Coercions) }

    it 'should have the main target domain defined' do
      subject.main_target_domain.should eq(domain)
    end
  end

  context 'with a block' do
    subject{ domain.coercions{|c| @seen=c} }

    it 'should yield the coercions' do
      subject
      @seen.should eq(subject)
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
myrrha-3.1.0 spec/ext/domain/test_coercions.rb
myrrha-3.0.0 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc7 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc6 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc5 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc4 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc3 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc2 spec/ext/domain/test_coercions.rb
myrrha-3.0.0.rc1 spec/ext/domain/test_coercions.rb