Sha256: c17bea098f1d03e4e9a82be6c582e5072f9549b18cf46366cf86f7a9807d0d6f

Contents?: true

Size: 602 Bytes

Versions: 3

Compression:

Stored size: 602 Bytes

Contents

require 'spec_helper'

describe Dicer::Delegator do
  let(:delegator) { Dicer::Delegator.make(Entity, [Cleaner]) }
  let(:entity) { Entity.new(:test => 1) }

  subject(:delegated) { delegator.new(entity) }

  it { should == entity }

  describe '#__id__' do
    subject { delegated.__id__ }

    it { should_not == entity.__id__ }
  end

  describe '#test' do
    subject { delegated.test }

    it { should == 1 }
  end

  describe '#id' do
    subject { delegated.id }

    it { should == entity.id }
  end

  describe '#clean' do
    subject { delegated.clean }

    it { should be_true }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dicer-0.2.0 spec/dicer/delegator_spec.rb
dicer-0.1.0 spec/dicer/delegator_spec.rb
dicer-0.0.1 spec/dicer/delegator_spec.rb