spec/acceptance/rest/auth_spec.rb in ably-0.8.0 vs spec/acceptance/rest/auth_spec.rb in ably-0.8.1

- old
+ new

@@ -73,10 +73,11 @@ expect(token_details.expires).to be_within(2).of(Time.now + ttl) end %w(client_id capability nonce timestamp ttl).each do |option| context "with option :#{option}", :webmock do - def coerce_if_time_value(field_name, value, multiply: false) + def coerce_if_time_value(field_name, value, options = {}) + multiply = options[:multiply] return value unless %w(timestamp ttl).include?(field_name) value.to_i * (multiply ? multiply : 1) end let(:random) { coerce_if_time_value(option, random_int_str) }