Sha256: f6bf0e56fbb090eb3a5ceab5726d6533004da159241358188fc59fd7aa690281

Contents?: true

Size: 364 Bytes

Versions: 22

Compression:

Stored size: 364 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe String do
  context 'bullet_class_name' do
    it 'should only return class name' do
      expect('Post:1'.bullet_class_name).to eq('Post')
    end

    it 'should return class name with namespace' do
      expect('Mongoid::Post:1234567890'.bullet_class_name).to eq('Mongoid::Post')
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bullet-7.0.7 spec/bullet/ext/string_spec.rb
bullet-7.0.6 spec/bullet/ext/string_spec.rb
bullet-7.0.5 spec/bullet/ext/string_spec.rb
bullet-7.0.4 spec/bullet/ext/string_spec.rb
bullet-7.0.3 spec/bullet/ext/string_spec.rb
bullet-7.0.2 spec/bullet/ext/string_spec.rb
bullet-7.0.1 spec/bullet/ext/string_spec.rb
bullet-7.0.0 spec/bullet/ext/string_spec.rb
bullet-6.1.5 spec/bullet/ext/string_spec.rb
bullet-6.1.4 spec/bullet/ext/string_spec.rb
bullet-6.1.3 spec/bullet/ext/string_spec.rb
bullet-6.1.2 spec/bullet/ext/string_spec.rb
bullet-6.1.1 spec/bullet/ext/string_spec.rb
bullet-6.1.0 spec/bullet/ext/string_spec.rb
bullet-6.0.2 spec/bullet/ext/string_spec.rb
bullet-6.0.1 spec/bullet/ext/string_spec.rb
bullet-6.0.0 spec/bullet/ext/string_spec.rb
bullet-5.9.0 spec/bullet/ext/string_spec.rb
bullet-5.8.1 spec/bullet/ext/string_spec.rb
bullet-5.8.0 spec/bullet/ext/string_spec.rb