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-5.7.6 spec/bullet/ext/string_spec.rb
bullet-5.7.5 spec/bullet/ext/string_spec.rb