Sha256: a9b03f66517fd369187d1c0fcc15dd7120a2161a7cb678a6fff819c38951550e

Contents?: true

Size: 905 Bytes

Versions: 19

Compression:

Stored size: 905 Bytes

Contents

require 'spec_helper'

describe Symbol do
  describe '#camelize' do
    it { expect(:sym.camelize).to be_kind_of(Symbol) }

    context 'when called with upper option' do
      it 'camelize the symbol' do
        expect(:underscore_sym.camelize(:upper)).to eq(:UnderscoreSym)
      end
    end

    context 'when called with lower option' do
      it 'camelize the symbol without captalization' do
        expect(:underscore_sym.camelize(:lower)).to eq(:underscoreSym)
      end
    end

    context 'when called without option' do
      it 'camelize the symbol' do
        expect(:underscore_sym.camelize).to eq(:UnderscoreSym)
      end
    end
  end

  describe '#underscore' do
    it { expect(:symBol.underscore).to be_kind_of(Symbol) }

    context 'when called with upper option' do
      it 'underscore the symbol' do
        expect(:symBol.underscore).to eq(:sym_bol)
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
darthjee-core_ext-1.5.6 spec/lib/symbol_spec.rb
darthjee-core_ext-1.5.5 spec/lib/symbol_spec.rb
darthjee-core_ext-1.5.4 spec/lib/symbol_spec.rb
darthjee-core_ext-1.5.3 spec/lib/symbol_spec.rb
darthjee-core_ext-1.5.2 spec/lib/symbol_spec.rb
darthjee-core_ext-1.5.1 spec/lib/symbol_spec.rb
darthjee-core_ext-1.5.0 spec/lib/symbol_spec.rb
darthjee-core_ext-1.4.1 spec/lib/symbol_spec.rb
darthjee-core_ext-1.4.0 spec/lib/symbol_spec.rb
darthjee-core_ext-1.3.1 spec/lib/symbol_spec.rb
darthjee-core_ext-1.3.0 spec/lib/symbol_spec.rb
darthjee-core_ext-1.2.6 spec/lib/symbol_spec.rb
bidu-core_ext-1.2.5 spec/lib/symbol_spec.rb
bidu-core_ext-1.2.4 spec/lib/symbol_spec.rb
bidu-core_ext-1.2.3 spec/lib/symbol_spec.rb
bidu-core_ext-1.2.2 spec/lib/symbol_spec.rb
bidu-core_ext-1.2.1 spec/lib/symbol_spec.rb
bidu-core_ext-1.2.0 spec/lib/symbol_spec.rb
bidu-core_ext-1.1.1 spec/lib/symbol_spec.rb