Sha256: 51c26251a2a0f507bf57806fd2c6fa72a8a465cc3ebf941d9b1cd8d33de08e32

Contents?: true

Size: 333 Bytes

Versions: 6

Compression:

Stored size: 333 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
bullet-5.7.4 spec/bullet/ext/string_spec.rb
bullet-5.7.3 spec/bullet/ext/string_spec.rb
bullet-5.7.2 spec/bullet/ext/string_spec.rb
bullet-5.7.1 spec/bullet/ext/string_spec.rb
bullet-5.7.0 spec/bullet/ext/string_spec.rb
bullet-5.6.1 spec/bullet/ext/string_spec.rb