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

Version Path
amalgalite-1.9.4-x64-mingw-ucrt spec/boolean_spec.rb
amalgalite-1.9.4-x86-mingw32 spec/boolean_spec.rb
amalgalite-1.9.4-x64-mingw32 spec/boolean_spec.rb
amalgalite-1.9.4 spec/boolean_spec.rb
amalgalite-1.9.1-x86-mingw32 spec/boolean_spec.rb
amalgalite-1.9.1-x64-mingw32 spec/boolean_spec.rb
amalgalite-1.9.1-x64-mingw-ucrt spec/boolean_spec.rb
amalgalite-1.9.1 spec/boolean_spec.rb
amalgalite-1.9.0-x64-mingw-ucrt spec/boolean_spec.rb
amalgalite-1.9.0-x86-mingw32 spec/boolean_spec.rb
amalgalite-1.9.0-x64-mingw32 spec/boolean_spec.rb
amalgalite-1.9.0 spec/boolean_spec.rb
amalgalite-1.8.0-x64-mingw-ucrt spec/boolean_spec.rb
amalgalite-1.8.0-x64-mingw32 spec/boolean_spec.rb
amalgalite-1.8.0-x86-mingw32 spec/boolean_spec.rb
amalgalite-1.8.0 spec/boolean_spec.rb
amalgalite-1.7.0-x86-mingw32 spec/boolean_spec.rb
amalgalite-1.7.0-x64-mingw32 spec/boolean_spec.rb
amalgalite-1.7.0 spec/boolean_spec.rb
amalgalite-1.6.3-x86-mingw32 spec/boolean_spec.rb