Sha256: 7d632f880e781881d0990478ec58c295783f220a747a8ee68a91e85cb76c90a8

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

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 do
  describe ".load!" do
    describe "should load all extensions by default" do
      ::Lazier.load!

      it "for Boolean" do
        expect(true).to respond_to("value")
        expect(true).to respond_to("to_i")
      end

      it "for DateTime" do
        expect(::DateTime).to respond_to("custom_format")
        expect(::DateTime.now).to respond_to("lstrftime")
      end

      it "for Hash" do
        expect({a: "b"}).to respond_to("a")
      end

      it "for Math" do
        expect(::Math).to respond_to("min")
      end

      it "for Object" do
        expect(0).to respond_to("debug_dump")
      end

      it "for Pathname" do
        expect(::Pathname.new($0)).to respond_to("components")
      end

      it "for String" do
        expect("").to respond_to("remove_accents")
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lazier-2.5.3 spec/lazier_spec.rb
lazier-2.5.2 spec/lazier_spec.rb
lazier-2.5.1 spec/lazier_spec.rb
lazier-2.5.0 spec/lazier_spec.rb
lazier-2.4.0 spec/lazier_spec.rb
lazier-2.0.0 spec/lazier_spec.rb