From 76c2548c4952043221e0b98f25ea3629707ff230 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Tue, 9 Jul 2013 10:12:10 +0200 Subject: [PATCH] Replace should_receive with expect...to receive --- spec/simple_oauth/header_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/simple_oauth/header_spec.rb b/spec/simple_oauth/header_spec.rb index 466a6e3..1560636 100644 --- a/spec/simple_oauth/header_spec.rb +++ b/spec/simple_oauth/header_spec.rb @@ -204,19 +204,19 @@ describe SimpleOAuth::Header do context "calls the appropriate signature method" do specify "when using HMAC-SHA1" do header = SimpleOAuth::Header.new(:get, 'https://api.twitter.com/1/statuses/friends.json', {}, :signature_method => 'HMAC-SHA1') - header.should_receive(:hmac_sha1_signature).once.and_return('HMAC_SHA1_SIGNATURE') + expect(header).to receive(:hmac_sha1_signature).once.and_return('HMAC_SHA1_SIGNATURE') expect(header.send(:signature)).to eq 'HMAC_SHA1_SIGNATURE' end specify "when using RSA-SHA1" do header = SimpleOAuth::Header.new(:get, 'https://api.twitter.com/1/statuses/friends.json', {}, :signature_method => 'RSA-SHA1') - header.should_receive(:rsa_sha1_signature).once.and_return('RSA_SHA1_SIGNATURE') + expect(header).to receive(:rsa_sha1_signature).once.and_return('RSA_SHA1_SIGNATURE') expect(header.send(:signature)).to eq 'RSA_SHA1_SIGNATURE' end specify "when using PLAINTEXT" do header = SimpleOAuth::Header.new(:get, 'https://api.twitter.com/1/statuses/friends.json', {}, :signature_method => 'PLAINTEXT') - header.should_receive(:plaintext_signature).once.and_return('PLAINTEXT_SIGNATURE') + expect(header).to receive(:plaintext_signature).once.and_return('PLAINTEXT_SIGNATURE') expect(header.send(:signature)).to eq 'PLAINTEXT_SIGNATURE' end end