tainbox
tainbox copied to clipboard
Fix #attribute_provided? behavior
#attribute_provided?
should return false
for attributes with default values.
class Foo
include Tainbox
attribute :bar, Integer
attribute :baz, Integer, default: 0
end
foo = Foo.new
expect(foo.bar).to eq(nil)
expect(foo.attribute_provided?(:bar)).to be_falsey
expect(person.baz).to eq(0)
expect(person.attribute_provided?(:baz)).to be_falsey