File: blank_spec.rb

package info (click to toggle)
ruby-powerpack 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: ruby: 799; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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