spec/weeter/plugins/subscription_plugin_spec.rb in weeter-0.15.0 vs spec/weeter/plugins/subscription_plugin_spec.rb in weeter-0.17.0
- old
+ new
@@ -2,20 +2,20 @@
module Weeter
module Plugins
describe SubscriptionPlugin do
describe "#get_initial_filters" do
- it "should delegate to the configured plugin" do
+ it "delegates to the configured plugin" do
client_app_config = Hashie::Mash.new(:subscription_plugin => :http)
-
- mock_plugin = mock(Subscription::Http)
- Subscription::Http.should_receive(:new).and_return(mock_plugin)
-
- mock_plugin.should_receive(:get_initial_filters).and_yield([{'foo' => 'bar'}])
+ 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|
- filter_params.should == [{'foo' => 'bar'}]
+ expect(filter_params).to eq([{'foo' => 'bar'}])
end
end
end
end
end