Sha256: 35b9ae6914a50c12d6c382b824d34f8af08047eae263e8c67936d5570eaa83e0

Contents?: true

Size: 367 Bytes

Versions: 18

Compression:

Stored size: 367 Bytes

Contents

require 'spec_helper'

describe 'String#blank?' do
  it 'returns true for an empty string' do
    expect(''.blank?).to be_truthy
  end

  it 'returns true for a string with only whitespace in it' do
    expect('     '.blank?).to be_truthy
  end

  it 'returns false for a string with non-whitespace chars in it' do
    expect('   test'.blank?).to be_falsey
  end
end

Version data entries

18 entries across 15 versions & 5 rubygems

Version Path
powerpack-0.1.3 spec/powerpack/string/blank_spec.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/powerpack-0.1.2/spec/powerpack/string/blank_spec.rb
powerpack-0.1.2 spec/powerpack/string/blank_spec.rb
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.4 vendor/bundle/ruby/2.3.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.3 vendor/bundle/ruby/2.3.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb
powerpack-0.1.1 spec/powerpack/string/blank_spec.rb