Sha256: 4dcca4682a8a4a6ab461908c44020540970f017c33fb327439c0355288207b8b
Contents?: true
Size: 718 Bytes
Versions: 5
Compression:
Stored size: 718 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' class FooClassCube < Ice::BaseCube revealing :first, :second end class FooClass include Ice::Cubeable def first "primero" end def second @second ||= SecondClass.new end end class SecondClass def to_ice "segundo" end end describe "BaseCube" do context "a cubeable class" do it "should automatically to_ice the cube_class" do FooClass.new.to_ice.class.should == FooClassCube end it "should retrieve revealed properties" do FooClass.new.to_ice.first.should == "primero" end it "should map revealed properties via to_ice" do FooClass.new.to_ice.second.should == "segundo" end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ice-0.2.4 | spec/base_cube_spec.rb |
ice-0.2.3 | spec/base_cube_spec.rb |
ice-0.2.2 | spec/base_cube_spec.rb |
ice-0.2.1 | spec/base_cube_spec.rb |
ice-0.2.0 | spec/base_cube_spec.rb |