sms-spec
sms-spec copied to clipboard
Spec class should be as flexible as Twilio class
@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.
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'
My pull request solves this:
https://github.com/manlycode/sms-spec/pull/20