spec/weeter/plugins/notification_plugin_spec.rb in weeter-0.15.0 vs spec/weeter/plugins/notification_plugin_spec.rb in weeter-0.17.0

- old
+ new

@@ -2,17 +2,17 @@ module Weeter module Plugins describe NotificationPlugin do describe "#publish_tweet" do - it "should delegate to the configured plugin" do + it "delegates to the configured plugin" do client_app_config = Hashie::Mash.new(:notification_plugin => :http) tweet_item = TweetItem.new({}) - - mock_plugin = mock(Notification::Http) - Notification::Http.should_receive(:new).and_return(mock_plugin) - - mock_plugin.should_receive(:publish_tweet).with(tweet_item) + + mock_plugin = double(Notification::Http) + expect(Notification::Http).to receive(:new).and_return(mock_plugin) + + expect(mock_plugin).to receive(:publish_tweet).with(tweet_item) plugin = NotificationPlugin.new(client_app_config) plugin.publish_tweet(tweet_item) end end