Sha256: c08a217b8b5208e1abdec5728548a767536a4b88799da53a89dc0ad46081a3c0
Contents?: true
Size: 748 Bytes
Versions: 1
Compression:
Stored size: 748 Bytes
Contents
# encoding: utf-8 describe AbstractMapper do let(:mapper) do allow(test).to receive(:finalize) { tree } test.new end let(:test) { Class.new(described_class) } let(:tree) { klass.new } let(:klass) do Class.new(AbstractMapper::Branch) do def transproc -> v { "called: #{v}" } end end end describe ".new" do subject { mapper } it { is_expected.to be_frozen } end # describe .new describe "#tree" do subject { mapper.tree } it { is_expected.to eql tree } it { is_expected.to be_frozen } end # describe #tree describe "#call" do subject { mapper.call :foo } it { is_expected.to eql "called: foo" } end # describe #call end # describe AbstractMapper
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
abstract_mapper-0.0.2 | spec/unit/abstract_mapper_spec.rb |