Sha256: 32bad6bd32697760d2ea8748b62f7b7c3019ae91802920591b36cc98bae1c463

Contents?: true

Size: 757 Bytes

Versions: 5

Compression:

Stored size: 757 Bytes

Contents

require 'spec_helper'

describe String do

  it 'should decapitalize' do
    'Sweet String'.decapitalize.should eq 'sweet String'
  end

  it 'should parse true booleans' do
    "true".to_bool.should   be_true
    "t".to_bool.should      be_true
    "yes".to_bool.should    be_true
    "y".to_bool.should      be_true
    "1".to_bool.should      be_true
    "on".to_bool.should     be_true
  end

  it 'should parse false booleans' do
    nil.to_s.to_bool.should   be_false
    "".to_bool.should         be_false
    "false".to_bool.should    be_false
    "f".to_bool.should        be_false
    "no".to_bool.should       be_false
    "n".to_bool.should        be_false
    "0".to_bool.should        be_false
    "off".to_bool.should      be_false
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bootstripe-0.2.23 spec/string_additions_spec.rb
bootstripe-0.2.22 spec/string_additions_spec.rb
bootstripe-0.2.20 spec/string_additions_spec.rb
bootstripe-0.2.19 spec/string_additions_spec.rb
bootstripe-0.2.18 spec/string_additions_spec.rb