Sha256: 3318feb8c566768937989fee87af0df13a23ffca36d71cb2c3ad7fc49002a008

Contents?: true

Size: 588 Bytes

Versions: 14

Compression:

Stored size: 588 Bytes

Contents

RSpec.describe String do
  let(:snake_result) { 'snake_case' }
  let(:bc_result) { 'Klass' }

  specify '#snakecase' do
    expect('SnakeCase'.snakecase).to eq snake_result
    expect('Snake-Case'.snakecase).to eq snake_result
    expect('Snake Case'.snakecase).to eq snake_result
    expect('Snake  -  Case'.snakecase).to eq snake_result
  end

  specify '#base_class_name' do
    expect('Namespace::Nested::Klass'.base_class_name).to eq bc_result
    expect('Nested::Klass'.base_class_name).to eq bc_result
    expect('Klass'.base_class_name).to eq bc_result
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby-lokalise-api-2.8.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.7.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.6.1 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.6.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.5.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.4.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.3.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.2.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.1.1 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.1.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.0.1 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.0.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-1.1.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-1.0.1 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb