File: object_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 (26 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

require 'spec_helper'

module Bullet
  module Registry
    describe Object do
      let(:post) { Post.first }
      let(:another_post) { Post.last }
      subject { Object.new.tap { |object| object.add(post.bullet_key) } }

      context '#include?' do
        it 'should include the object' do
          expect(subject).to be_include(post.bullet_key)
        end
      end

      context '#add' do
        it 'should add an object' do
          subject.add(another_post.bullet_key)
          expect(subject).to be_include(another_post.bullet_key)
        end
      end
    end
  end
end