In development modus we do not send any sms messages and thus we do not have any environment variables to define our username and password in it. This is only valid for production and staging environment. Before this, we defined username and password directly in initializer file. When initializing as follows Mollie::SMS.username = ENV['MOLLIE_USERNAME'] Mollie::SMS.password = ENV['MOLLIE_PASSWORD'] `username` and `password` will be nil. As result of this, @password = Digest::MD5.hexdigest(password) returns an error: TypeError: no implicit conversion of nil into String Therefore I convert any provided password to string. `nil.to_s` will result in an empty string ('').
…esting and add assert_sms_messages/assert_no_sms_messages assertions.
…ryFailure when it fails.
Right now we use it in a Rails app, so activesupport is always available.