sms-spec icon indicating copy to clipboard operation
sms-spec copied to clipboard

Spec class should be as flexible as Twilio class

Open martinstreicher opened this issue 11 years ago • 2 comments

@client = Twilio::REST::Client.new account_sid, auth_token

# alternatively, you can preconfigure the client like so
Twilio.configure do |config|
  config.account_sid = account_sid
  config.auth_token = auth_token
end

# and then you can create a new client without parameters
@client = Twilio::REST::Client.new

However, the sms-spec entry point for Client.new requires arguments. So if you use the convenience code above, things break when including the test tool.

martinstreicher avatar Nov 04 '14 17:11 martinstreicher

 1) Sms::Message Instance Methods #send returns a Twilio result
     Failure/Error: message = described_class.send message: :message, number: cell_number
     ArgumentError:
       wrong number of arguments (0 for 2)
     # /Users/mss67/.rvm/gems/ruby-2.1.2@dusk/gems/sms-spec-0.1.7/lib/sms_spec/drivers/twilio-ruby.rb:3:in `initialize'

martinstreicher avatar Nov 04 '14 17:11 martinstreicher

My pull request solves this:

https://github.com/manlycode/sms-spec/pull/20

rosskevin avatar Feb 05 '15 00:02 rosskevin