Sha256: fb990090de7887329a4ae7abb257bde91889ee46dd85b0d3fb7a9f33f03b7426

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

# encoding: utf-8
#
# This file is part of the lazier gem. Copyright (C) 2013 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
    ENV["LANG"] = "en"
    ::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-2.6.0 spec/lazier/boolean_spec.rb