Sha256: 0180c5ab5a1f56fb1028903a32ef197c0304d4f2073766bff13e366c7e0bbf46
Contents?: true
Size: 573 Bytes
Versions: 2
Compression:
Stored size: 573 Bytes
Contents
require 'spec_helper' describe Decorum::CallableDecorator do let(:decorator) do c = Decorum::Examples::Coffee.new decorator = nil c._decorum_decorate(Decorum::Examples::MilkDecorator) { |d| decorator = d } decorator end it "enables methods to be called directly on decorators" do decorator.add_milk expect(decorator.root.milk_level).to eq(1) end context "testing assumptions" do # just make sure we did this right... it "is a Decorator" do expect(decorator.is_a?(Decorum::CallableDecorator)).to be true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
decorum-0.5.1 | spec/unit/callable_decorator_spec.rb |
decorum-0.5.0 | spec/unit/callable_decorator_spec.rb |