Sha256: 309247f29c0a6e8b237bee26dabc1bfe85a2f85c3e0e7a5cf62d85b9034abbfd

Contents?: true

Size: 463 Bytes

Versions: 31

Compression:

Stored size: 463 Bytes

Contents

require 'flipper/ui/util'

RSpec.describe Flipper::UI::Util do
  describe '#blank?' do
    context 'with a string' do
      it 'returns true if blank' do
        expect(described_class.blank?(nil)).to be(true)
        expect(described_class.blank?('')).to be(true)
        expect(described_class.blank?('   ')).to be(true)
      end

      it 'returns false if not blank' do
        expect(described_class.blank?('nope')).to be(false)
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
flipper-ui-1.3.2 spec/flipper/ui/util_spec.rb
flipper-ui-1.3.1 spec/flipper/ui/util_spec.rb
flipper-ui-1.3.0 spec/flipper/ui/util_spec.rb
flipper-ui-1.3.0.pre spec/flipper/ui/util_spec.rb
flipper-ui-1.2.2 spec/flipper/ui/util_spec.rb
flipper-ui-1.2.1 spec/flipper/ui/util_spec.rb
flipper-ui-1.2.0 spec/flipper/ui/util_spec.rb
flipper-ui-1.1.2 spec/flipper/ui/util_spec.rb
flipper-ui-1.1.1 spec/flipper/ui/util_spec.rb
flipper-ui-1.1.0 spec/flipper/ui/util_spec.rb
flipper-ui-1.0.0 spec/flipper/ui/util_spec.rb
flipper-ui-1.0.0.pre spec/flipper/ui/util_spec.rb
flipper-ui-0.28.3 spec/flipper/ui/util_spec.rb
flipper-ui-0.28.2 spec/flipper/ui/util_spec.rb
flipper-ui-0.28.1 spec/flipper/ui/util_spec.rb
flipper-ui-0.28.0 spec/flipper/ui/util_spec.rb
flipper-ui-0.27.1 spec/flipper/ui/util_spec.rb
flipper-ui-0.27.0 spec/flipper/ui/util_spec.rb
flipper-ui-0.26.2 spec/flipper/ui/util_spec.rb
flipper-ui-0.26.0 spec/flipper/ui/util_spec.rb