Sha256: 6174fc806d0051dee2943b0f22dd0bb761e1c275cc1831340b5d720dd8a6384d
Contents?: true
Size: 746 Bytes
Versions: 11
Compression:
Stored size: 746 Bytes
Contents
require 'spec_helper' module Kosher describe Condition do describe "#to_i" do def this(str) Condition.new(str).to_i end it "casts as integer" do this('new').should eql 1 this('mint').should eql 2 this('verygood').should eql 3 this('good').should eql 4 this('acceptable').should eql 5 end it "casts unrecognized conditions as 6" do this('refurbished').should eql 6 end end describe "#kosher?" do it "returns true if condition is good or better" do Condition.new('verygood').should be_kosher Condition.new('good').should be_kosher Condition.new('acceptable').should_not be_kosher end end end end
Version data entries
11 entries across 11 versions & 2 rubygems