Skip to content

Commit 3e77e34

Browse files
committed
fixes specs
1 parent 6dd5647 commit 3e77e34

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

test/plan_builder_spec.rb

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@
203203
describe 'when none exists on stripe.com' do
204204
let(:headers) { load_request_fixture('stripe_plans_headers_2017.json') }
205205
before do
206+
Stripe.api_version = '2018-02-04'
206207
Stripe::Plan.stubs(:retrieve).raises(Stripe::InvalidRequestError.new("not found", "id"))
207208

208209
stub_request(:get, "https://api.stripe.com/v1/plans").
@@ -212,26 +213,26 @@
212213

213214
it 'creates the plan online' do
214215
Stripe::Plan.expects(:create).with(
215-
:id => :gold,
216-
:currency => 'usd',
217-
:name => 'Solid Gold',
218-
:amount => 699,
219-
:interval => 'month',
220-
:interval_count => 1,
221-
:trial_period_days => 0
216+
id: :gold,
217+
currency: 'usd',
218+
name: 'Solid Gold',
219+
amount: 699,
220+
interval: 'month',
221+
interval_count: 1,
222+
trial_period_days: 0
222223
)
223224
Stripe::Plans::GOLD.put!
224225
end
225226

226227
it 'creates a plan with an alternative currency' do
227228
Stripe::Plan.expects(:create).with(
228-
:id => :alternative_currency,
229-
:currency => 'cad',
230-
:name => 'Alternative Currency',
231-
:amount => 699,
232-
:interval => 'month',
233-
:interval_count => 1,
234-
:trial_period_days => 0
229+
id: :alternative_currency,
230+
currency: 'cad',
231+
name: 'Alternative Currency',
232+
amount: 699,
233+
interval: 'month',
234+
interval_count: 1,
235+
trial_period_days: 0
235236
)
236237
Stripe::Plans::ALTERNATIVE_CURRENCY.put!
237238
end
@@ -384,16 +385,16 @@
384385

385386
it 'creates the plan online' do
386387
Stripe::Plan.expects(:create).with(
387-
:id => :gold,
388-
:currency => 'usd',
389-
:product => {
390-
:name => 'Solid Gold',
391-
:statement_descriptor => nil,
388+
id: :gold,
389+
currency: 'usd',
390+
product: {
391+
name: 'Solid Gold',
392+
statement_descriptor: nil,
392393
},
393-
:amount => 699,
394-
:interval => 'month',
395-
:interval_count => 1,
396-
:trial_period_days => 0
394+
amount: 699,
395+
interval: 'month',
396+
interval_count: 1,
397+
trial_period_days: 0
397398
)
398399

399400
subject

0 commit comments

Comments
 (0)