Sha256: 6ef61546e81559d1e5d40d09c34e9d3de1e151bcc51f076280165c4770b5e396

Contents?: true

Size: 657 Bytes

Versions: 1

Compression:

Stored size: 657 Bytes

Contents

# encoding: utf-8
#
# This file is part of the lazier gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
#

require "spec_helper"

describe Lazier::Boolean do
  before(:all) do
    ::Lazier.load!
  end

  describe "#to_i" do
    it "should return 1 for true" do
      expect(true.to_i).to eq(1)
    end

    it "should return 0 for false" do
      expect(false.to_i).to eq(0)
    end
  end

  describe "#value" do
    it "should return self" do
      expect(true.value).to be_true
      expect(false.value).to be_false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lazier-1.0.0 spec/cowtech-extensions/boolean_spec.rb