Sha256: 492b6e035d9258c471937e86ae94fb9c760b06a62642dc626572c3d9b713e944
Contents?: true
Size: 799 Bytes
Versions: 2
Compression:
Stored size: 799 Bytes
Contents
require 'meta_methods/meta_methods' describe MetaMethods do subject { MetaMethods } describe "#define_attribute" do it "creates new attribute on object" do object = Object.new subject.define_attribute object, :new_attribute, "new_attribute_value" expect(object.new_attribute).to eq("new_attribute_value") end end describe "#define_attributes" do it "creates new attributes on object" do object = Object.new subject.define_attributes object, {new_attribute1: "new_attribute_value1", new_attribute2: "new_attribute_value2" } expect(object.new_attribute1).to eq("new_attribute_value1") expect(object.new_attribute2).to eq("new_attribute_value2") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
webmock_method-1.0.1 | spec/meta_methods_spec.rb |
webmock_method-1.0.0 | spec/meta_methods_spec.rb |