File: string_spec.rb

package info (click to toggle)
ruby-bullet 7.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 836 kB
  • sloc: ruby: 6,133; javascript: 57; sh: 27; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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