Sha256: b8170970b680e706e0e8bd70d0df0b8d8922bd004673a76e5e90cab22feb2229
Contents?: true
Size: 682 Bytes
Versions: 1
Compression:
Stored size: 682 Bytes
Contents
testcase Anise::Annotative::Attributes do context "general" do cX = Class.new do extend Anise::Annotative::Attributes attr :q attr :a, :x => 1 end test "attr :a" do cX.ann(:a) == {:x=>1} end end context "attr" do cA = Class.new do extend Anise::Annotative::Attributes attr :x, :cast=>"to_s" end test do cA.ann(:x,:cast) == "to_s" end end context "attr_accessor" do cA = Class.new do extend Anise::Annotative::Attributes attr_accessor :x, :cast=>"to_s" end test do a = cA.new r = cA.instance_attributes - [:taguri] r == [:x] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anise-0.7.0 | test/case_attributes.rb |