Sha256: 0d7ed8942bba7eb875435f7079e302089ef7704dddfa0db51f98616003fe8445
Contents?: true
Size: 721 Bytes
Versions: 2
Compression:
Stored size: 721 Bytes
Contents
require 'spec_helper' describe Dicer::Contextable do let(:entity) { Entity.new({}) } let(:cleaning_context) { CleaningContext.new } describe '#in_context' do subject { entity.in_context(cleaning_context) } it { should respond_to(:clean) } it { should == entity } context 'with block' do it do entity.in_context(cleaning_context) do |cleaner| cleaner.should respond_to(:clean) end end end end describe '#as' do subject { entity.as(Cleaner) } it { should respond_to(:clean) } context 'with block' do it do entity.as(Cleaner) do |cleaner| cleaner.should respond_to(:clean) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dicer-0.1.0 | spec/dicer/contextable_spec.rb |
dicer-0.0.1 | spec/dicer/contextable_spec.rb |