Sha256: f6d6250155b776500f1bc33cd9fa2cf1bccd2c16bf579da4376d97c01a27428a
Contents?: true
Size: 712 Bytes
Versions: 1
Compression:
Stored size: 712 Bytes
Contents
require 'spec_helper' RSpec.describe Onebox::Helpers do describe '.blank?' do it { expect(Onebox::Helpers.blank?("")).to be(true) } it { expect(Onebox::Helpers.blank?(" ")).to be(true) } it { expect(Onebox::Helpers.blank?("test")).to be(false) } it { expect(Onebox::Helpers.blank?(["test", "testing"])).to be(false) } it { expect(Onebox::Helpers.blank?([])).to be(true) } it { expect(Onebox::Helpers.blank?({})).to be(true) } it { expect(Onebox::Helpers.blank?({a: 'test'})).to be(false) } it { expect(Onebox::Helpers.blank?(nil)).to be(true) } it { expect(Onebox::Helpers.blank?(true)).to be(false) } it { expect(Onebox::Helpers.blank?(false)).to be(true) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
onebox-1.6.5 | spec/lib/onebox/helpers_spec.rb |