Sha256: e6ee6f9570837396054872363fa950adf0b41de9c3118e6ffe68ae769a568a73
Contents?: true
Size: 601 Bytes
Versions: 10
Compression:
Stored size: 601 Bytes
Contents
require 'wml_spec_helper' describe Weskit::WML::Attributes do include WMLHelpers let(:attribute) { Weskit::WML::Attribute.new :foo, :bar } let(:attributes) { Weskit::WML::Attributes.new } it 'has hash like access' do attributes << attribute attributes[:foo].should match_value_of(:bar) attributes[:foo].attribute.should have_same_representation_as(attribute) end it 'store attributes only' do expect { attributes.push attribute }.to change { attributes.size }.from(0).to(1) expect { attributes.push :boo }.to raise_error(Weskit::WML::Errors::InvalidItem) end end
Version data entries
10 entries across 10 versions & 1 rubygems