Sha256: f77e09dbe96070e88b6e71cfff23f44e1a477ee08d7f20421db6dc18ec2dcbed
Contents?: true
Size: 522 Bytes
Versions: 37
Compression:
Stored size: 522 Bytes
Contents
require 'spec_helper' require 'amalgalite' require 'amalgalite/boolean' describe Amalgalite::Boolean do %w[ True Y Yes T 1 ].each do |v| it "converts #{v} to true" do Amalgalite::Boolean.to_bool(v).should == true end end %w[ False F f No n 0 ].each do |v| it "converts #{v} to false " do Amalgalite::Boolean.to_bool(v).should == false end end %w[ other things nil ].each do |v| it "converts #{v} to nil" do Amalgalite::Boolean.to_bool(v).should == nil end end end
Version data entries
37 entries across 37 versions & 2 rubygems