Sha256: 5c5c1bb9ecfffc926eb833508e2ffabd155f15d6f91f30cd0a5b9fa1462f381d
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
# -*- coding: utf-8 -*- require 'spec_helper' describe Rnfse::String do describe '::camelize' do context 'quando uma string simples,' do let(:string) { 'portals' } let(:camelized_string) { 'Portals' } it { expect(Rnfse::String.camelize(string)).to eq(camelized_string) } end context 'quando uma string com undescore,' do let(:string) { 'portals_two' } let(:camelized_string) { 'PortalsTwo' } it { expect(Rnfse::String.camelize(string)).to eq(camelized_string) } end end describe '#camelize' do let(:string) { Rnfse::String.new('portals') } let(:camelized_string) { 'Portals' } it { expect(string.camelize).to eq(camelized_string) } end describe '::underscore' do context 'quando uma palavra em CamelCase' do let(:string) { 'CamelCase' } let(:underscored_string) { 'camel_case' } it { expect(Rnfse::String.underscore(string)).to eq(underscored_string) } end end describe '#underscore' do let(:string) { Rnfse::String.new('CamelCase') } let(:underscored_string) { 'camel_case' } it { expect(string.underscore).to eq(underscored_string) } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rnfse-0.3.0 | spec/string_spec.rb |
rnfse-0.0.3 | spec/string_spec.rb |
rnfse-0.0.2 | spec/string_spec.rb |
rnfse-0.0.1 | spec/string_spec.rb |