Sha256: 586acc841b06ad00ad1111240d74a260e59852603c5f742a1508c89b7231aa0c

Contents?: true

Size: 422 Bytes

Versions: 51

Compression:

Stored size: 422 Bytes

Contents

require "spec_helper"

describe Object do

  describe "#blank?" do
    [nil, false, [], {}].each do |object|
      it "should return true for: #{object.inspect}" do
        expect(object.blank?).to be_true
      end
    end

    [true, [nil], 1, "string", { :key => "value" }].each do |object|
      it "should return false for: #{object.inspect}" do
        expect(object.blank?).to be_false
      end
    end
  end

end

Version data entries

51 entries across 43 versions & 6 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/nori-2.6.0/spec/nori/core_ext/object_spec.rb