Sha256: 3bb2663ca515a81ea98196756aba662b3305e39cb127e2e109ade5f5aaa5db0a

Contents?: true

Size: 621 Bytes

Versions: 11

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

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

11 entries across 11 versions & 1 rubygems

Version Path
ruby-lokalise-api-4.4.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-4.3.1 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-4.3.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-4.2.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-4.1.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-4.0.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-3.1.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-3.0.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.10.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.9.0.1 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb
ruby-lokalise-api-2.9.0 spec/lib/ruby-lokalise-api/utils/snakecase_spec.rb