Sha256: 1151ec95b4bdc02162773d460b4a7bfb9170067441e88f68aaf52a3240596814

Contents?: true

Size: 333 Bytes

Versions: 39

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

39 entries across 39 versions & 2 rubygems

Version Path
bullet-5.6.0 spec/bullet/ext/string_spec.rb
bullet-5.5.1 spec/bullet/ext/string_spec.rb
bullet-5.5.0 spec/bullet/ext/string_spec.rb
bullet-5.4.3 spec/bullet/ext/string_spec.rb
bullet-5.4.2 spec/bullet/ext/string_spec.rb
bullet-5.4.1 spec/bullet/ext/string_spec.rb
bullet-5.4.0 spec/bullet/ext/string_spec.rb
bullet-5.3.0 spec/bullet/ext/string_spec.rb
bullet-5.2.1 spec/bullet/ext/string_spec.rb
bullet-5.2.0 spec/bullet/ext/string_spec.rb
bullet-5.1.1 spec/bullet/ext/string_spec.rb
bullet-5.1.0 spec/bullet/ext/string_spec.rb
bullet-5.0.0 spec/bullet/ext/string_spec.rb
bullet-4.14.10 spec/bullet/ext/string_spec.rb
bullet-4.14.9 spec/bullet/ext/string_spec.rb
bullet-4.14.8 spec/bullet/ext/string_spec.rb
bullet_instructure-4.14.8 spec/bullet/ext/string_spec.rb
bullet-4.14.7 spec/bullet/ext/string_spec.rb
bullet_instructure-4.14.7 spec/bullet/ext/string_spec.rb
bullet-4.14.6 spec/bullet/ext/string_spec.rb