Sha256: da8314592025ecff53a438ea4950e25260d9d81ded45986d5da3496186bd3972

Contents?: true

Size: 323 Bytes

Versions: 16

Compression:

Stored size: 323 Bytes

Contents

require 'spec_helper'

describe String do
  context "bullet_class_name" do
    it "should only return class name" do
      "Post:1".bullet_class_name.should == "Post"
    end

    it "should return class name with namespace" do
      "Mongoid::Post:1234567890".bullet_class_name.should == "Mongoid::Post"
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bullet-4.7.1 spec/bullet/ext/string_spec.rb
bullet-4.7.0 spec/bullet/ext/string_spec.rb
bullet-4.6.0 spec/bullet/ext/string_spec.rb
bullet-4.5.0 spec/bullet/ext/string_spec.rb
bullet-4.4.0 spec/bullet/ext/string_spec.rb
bullet-4.3.1 spec/bullet/ext/string_spec.rb
bullet-4.3.0 spec/bullet/ext/string_spec.rb
bullet-4.2.0 spec/bullet/ext/string_spec.rb
bullet-4.1.6 spec/bullet/ext/string_spec.rb
bullet-4.1.5 spec/bullet/ext/string_spec.rb
bullet-4.1.4 spec/bullet/ext/string_spec.rb
bullet-4.1.3 spec/bullet/ext/string_spec.rb
bullet-4.1.2 spec/bullet/ext/string_spec.rb
bullet-4.1.1 spec/bullet/ext/string_spec.rb
bullet-4.1.0 spec/bullet/ext/string_spec.rb
bullet-4.0.0 spec/bullet/ext/string_spec.rb