Sha256: a16c49523d869ab0dfa5125d40754767299fc3ee0a19250c691c4d51a58b94c5

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 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 'snake case the symbol' 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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bidu-core_ext-1.0.0 spec/lib/symbol_spec.rb