Sha256: db76c80a16640a5f10120a2cb7a07b8dd4810311bd1b2f2d48d9e515732a0119

Contents?: true

Size: 715 Bytes

Versions: 7

Compression:

Stored size: 715 Bytes

Contents

require 'spec_helper'

module Weeter
  module Plugins
    describe SubscriptionPlugin do
      describe "#get_initial_filters" do
        it "delegates to the configured plugin" do
          client_app_config = Hashie::Mash.new(:subscription_plugin => :http)

          mock_plugin = double(Subscription::Http)
          expect(Subscription::Http).to receive(:new).and_return(mock_plugin)

          expect(mock_plugin).to receive(:get_initial_filters).and_yield([{'foo' => 'bar'}])

          plugin = SubscriptionPlugin.new(client_app_config)
          plugin.get_initial_filters do |filter_params|
            expect(filter_params).to eq([{'foo' => 'bar'}])
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
weeter-0.19.4 spec/weeter/plugins/subscription_plugin_spec.rb
weeter-0.19.3 spec/weeter/plugins/subscription_plugin_spec.rb
weeter-0.19.2 spec/weeter/plugins/subscription_plugin_spec.rb
weeter-0.19.1 spec/weeter/plugins/subscription_plugin_spec.rb
weeter-0.19.0 spec/weeter/plugins/subscription_plugin_spec.rb
weeter-0.18.0 spec/weeter/plugins/subscription_plugin_spec.rb
weeter-0.17.0 spec/weeter/plugins/subscription_plugin_spec.rb