signet 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,8 +26,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
26
26
  "oauth_token" => "dpf43f3p2l4k3l03",
27
27
  "oauth_token_secret" => "kd94hf93k423kf44"
28
28
  })
29
- token.key.should == "dpf43f3p2l4k3l03"
30
- token.secret.should == "kd94hf93k423kf44"
29
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
30
+ expect(token.secret).to eq "kd94hf93k423kf44"
31
31
  end
32
32
 
33
33
  it 'should accept :oauth_token and :oauth_token_secret pairs' do
@@ -35,8 +35,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
35
35
  :oauth_token => "dpf43f3p2l4k3l03",
36
36
  :oauth_token_secret => "kd94hf93k423kf44"
37
37
  })
38
- token.key.should == "dpf43f3p2l4k3l03"
39
- token.secret.should == "kd94hf93k423kf44"
38
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
39
+ expect(token.secret).to eq "kd94hf93k423kf44"
40
40
  end
41
41
 
42
42
  it 'should accept "key" and "secret" pairs' do
@@ -44,8 +44,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
44
44
  "key" => "dpf43f3p2l4k3l03",
45
45
  "secret" => "kd94hf93k423kf44"
46
46
  })
47
- token.key.should == "dpf43f3p2l4k3l03"
48
- token.secret.should == "kd94hf93k423kf44"
47
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
48
+ expect(token.secret).to eq "kd94hf93k423kf44"
49
49
  end
50
50
 
51
51
  it 'should accept :key and :secret pairs' do
@@ -53,8 +53,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
53
53
  :key => "dpf43f3p2l4k3l03",
54
54
  :secret => "kd94hf93k423kf44"
55
55
  )
56
- token.key.should == "dpf43f3p2l4k3l03"
57
- token.secret.should == "kd94hf93k423kf44"
56
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
57
+ expect(token.secret).to eq "kd94hf93k423kf44"
58
58
  end
59
59
 
60
60
  it 'should not complain about additional parameters' do
@@ -63,8 +63,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
63
63
  "oauth_token_secret" => "kd94hf93k423kf44",
64
64
  "oauth_version" => "1.0"
65
65
  })
66
- token.key.should == "dpf43f3p2l4k3l03"
67
- token.secret.should == "kd94hf93k423kf44"
66
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
67
+ expect(token.secret).to eq "kd94hf93k423kf44"
68
68
  end
69
69
 
70
70
  it 'should allow parameters to be specified as an implicit Hash' do
@@ -83,8 +83,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
83
83
  "oauth_token_secret" => "kd94hf93k423kf44",
84
84
  "oauth_version" => "1.0"
85
85
  }))
86
- token.key.should == "dpf43f3p2l4k3l03"
87
- token.secret.should == "kd94hf93k423kf44"
86
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
87
+ expect(token.secret).to eq "kd94hf93k423kf44"
88
88
  end
89
89
 
90
90
  it 'should allow parameters to be specified as an Enumerable' do
@@ -93,8 +93,8 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
93
93
  ["oauth_token_secret", "kd94hf93k423kf44"],
94
94
  ["oauth_version", "1.0"]
95
95
  ])
96
- token.key.should == "dpf43f3p2l4k3l03"
97
- token.secret.should == "kd94hf93k423kf44"
96
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
97
+ expect(token.secret).to eq "kd94hf93k423kf44"
98
98
  end
99
99
 
100
100
  it 'should allow parameters to be specified as an implicit Array' do
@@ -113,47 +113,47 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
113
113
  ["oauth_token_secret", "kd94hf93k423kf44"],
114
114
  ["oauth_version", "1.0"]
115
115
  ]))
116
- token.key.should == "dpf43f3p2l4k3l03"
117
- token.secret.should == "kd94hf93k423kf44"
116
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
117
+ expect(token.secret).to eq "kd94hf93k423kf44"
118
118
  end
119
119
 
120
120
  it 'should raise an error if key and secret are not present' do
121
- (lambda do
121
+ expect(lambda do
122
122
  Signet::OAuth1::Credential.new({})
123
- end).should raise_error(ArgumentError)
123
+ end).to raise_error(ArgumentError)
124
124
  end
125
125
 
126
126
  it 'should allow key and secret to be passed in as a tuple' do
127
127
  token = Signet::OAuth1::Credential.new(
128
128
  ["dpf43f3p2l4k3l03", "kd94hf93k423kf44"]
129
129
  )
130
- token.key.should == "dpf43f3p2l4k3l03"
131
- token.secret.should == "kd94hf93k423kf44"
130
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
131
+ expect(token.secret).to eq "kd94hf93k423kf44"
132
132
  end
133
133
 
134
134
  it 'should allow key and secret to be passed in as normal parameters' do
135
135
  token = Signet::OAuth1::Credential.new(
136
136
  "dpf43f3p2l4k3l03", "kd94hf93k423kf44"
137
137
  )
138
- token.key.should == "dpf43f3p2l4k3l03"
139
- token.secret.should == "kd94hf93k423kf44"
138
+ expect(token.key).to eq "dpf43f3p2l4k3l03"
139
+ expect(token.secret).to eq "kd94hf93k423kf44"
140
140
  end
141
141
 
142
142
  it 'should raise an error if key or secret are of the wrong type' do
143
- (lambda do
143
+ expect(lambda do
144
144
  Signet::OAuth1::Credential.new("dpf43f3p2l4k3l03", 42)
145
- end).should raise_error(TypeError)
146
- (lambda do
145
+ end).to raise_error(TypeError)
146
+ expect(lambda do
147
147
  Signet::OAuth1::Credential.new(42, "kd94hf93k423kf44")
148
- end).should raise_error(TypeError)
148
+ end).to raise_error(TypeError)
149
149
  end
150
150
 
151
151
  it 'should raise an error if the wrong number of arguments are passed' do
152
- (lambda do
152
+ expect(lambda do
153
153
  Signet::OAuth1::Credential.new(
154
154
  "dpf43f3p2l4k3l03", "kd94hf93k423kf44", "something else"
155
155
  )
156
- end).should raise_error(ArgumentError)
156
+ end).to raise_error(ArgumentError)
157
157
  end
158
158
 
159
159
  it 'should convert to a Hash object' do
@@ -161,7 +161,7 @@ describe Signet::OAuth1::Credential, 'with a Hash for initialization' do
161
161
  "dpf43f3p2l4k3l03", "kd94hf93k423kf44"
162
162
  )
163
163
  parameters = token.to_h
164
- parameters['oauth_token'].should == "dpf43f3p2l4k3l03"
165
- parameters['oauth_token_secret'].should == "kd94hf93k423kf44"
164
+ expect(parameters['oauth_token']).to eq "dpf43f3p2l4k3l03"
165
+ expect(parameters['oauth_token_secret']).to eq "kd94hf93k423kf44"
166
166
  end
167
167
  end