Sha256: 52a6df2198501cfb5660d8bdb3a760d566a19073ccbb4634bf63fb8eab07b25b
Contents?: true
Size: 676 Bytes
Versions: 17
Compression:
Stored size: 676 Bytes
Contents
require "spec_helper" require "shamu/attributes" describe Shamu::Attributes::FluidAssignment do let( :klass ) do Class.new do include Shamu::Attributes include Shamu::Attributes::Assignment include Shamu::Attributes::FluidAssignment attribute :value end end it "returns the current value with no arguments" do instance = klass.new( value: "one" ) expect( instance.value ).to eq "one" end it "assigns the value when arguments present" do instance = klass.new instance.value( "two" ) end it "return self on assignment" do instance = klass.new expect( instance.value( "two" ) ).to be instance end end
Version data entries
17 entries across 17 versions & 1 rubygems