Sha256: 9aac8a002e2b13c8a33c0723ce5d184ceadfa97a019ae0c75a692f2e44f833e6

Contents?: true

Size: 790 Bytes

Versions: 39

Compression:

Stored size: 790 Bytes

Contents

require 'spec_helper'

module Bullet
  describe NotificationCollector do
    subject { NotificationCollector.new.tap { |collector| collector.add("value") } }

    context "#add" do
      it "should add a value" do
        subject.add("value1")
        expect(subject.collection).to be_include("value1")
      end
    end

    context "#reset" do
      it "should reset collector" do
        subject.reset
        expect(subject.collection).to be_empty
      end
    end

    context "#notifications_present?" do
      it "should be true if collection is not empty" do
        expect(subject).to be_notifications_present
      end

      it "should be false if collection is empty" do
        subject.reset
        expect(subject).not_to be_notifications_present
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

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