Sha256: 45e85c9418f650a20d12f1c4da93c6dcf3e098947aa8288dbbda26aace69f72e

Contents?: true

Size: 362 Bytes

Versions: 11

Compression:

Stored size: 362 Bytes

Contents

require 'spec_helper'

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

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

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

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/blank_spec.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/string/blank_spec.rb
powerpack-0.1.0 spec/powerpack/string/blank_spec.rb
powerpack-0.0.9 spec/powerpack/string/blank_spec.rb
powerpack-0.0.8 spec/powerpack/string/blank_spec.rb
powerpack-0.0.7 spec/powerpack/string/blank_spec.rb
powerpack-0.0.6 spec/powerpack/string/blank_spec.rb
powerpack-0.0.5 spec/powerpack/string/blank_spec.rb
powerpack-0.0.4 spec/powerpack/string/blank_spec.rb
powerpack-0.0.3 spec/powerpack/string/blank_spec.rb
powerpack-0.0.2 spec/powerpack/string/blank_spec.rb