Sha256: 093e4aa5989a017b01362104d88ddd47f2894af77f06f9ffb599ffdf1b007ef5
Contents?: true
Size: 647 Bytes
Versions: 2
Compression:
Stored size: 647 Bytes
Contents
# Tests on integer-specific functionality require 'lib/maintain' describe Maintain do before :each do class MaintainTest extend Maintain end end describe "integer" do before :each do MaintainTest.maintain :kind, :integer => true do state :man, 1 state :woman, 2 state :none, 3 end @maintainer = MaintainTest.new end it "should return valid names, too" do @maintainer.kind = :woman @maintainer.kind.name.should == "woman" end it "should handle numbery strings" do @maintainer.kind = "3" @maintainer.none?.should be_true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
maintain-0.1.6 | spec/integer_spec.rb |
maintain-0.1.5 | spec/integer_spec.rb |