Sha256: a261f9f7c2b761d3a37526c0f81e504eada7f5db6e6f43ac7d6c03142072cec3

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

require "spec_helper"

RSpec.describe PubsubNotifier::Broadcasters::Base do
  let(:broadcaster) { described_class.new }

  describe "#configure" do
    before { broadcaster.configure(x: 1, y: -> { 2 }) }

    it "sets option with value" do
      expect(broadcaster.options[:x]).to eq 1
    end

    it "sets option with proc" do
      expect(broadcaster.options[:y]).to eq 2
    end
  end

  describe "#broadcast" do
    it { expect { broadcaster.broadcast(nil, nil, nil) }.to raise_error(NotImplementedError) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pubsub_notifier-0.1.2 spec/lib/broadcasters_spec.rb