File: blank_spec.rb

package info (click to toggle)
ruby-powerpack 0.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 320 kB
  • ctags: 53
  • sloc: ruby: 727; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 362 bytes parent folder | download
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_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