Skip to content

Commit

Permalink
Added spec for config clas
Browse files Browse the repository at this point in the history
  • Loading branch information
spidergears committed May 13, 2015
1 parent 93092bf commit c7f3f41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/valuefirst/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def initialize(opts = {})

def validate
errors = []
errors << "Invalid username" if @username.nil?
errors << "Invalid password" if @password.nil?
errors << "Invalid username" if @username.nil? || @username.empty?
errors << "Invalid password" if @password.nil? || @password.empty?
errors << "API version not supported" unless @version == '1.2'
unless errors.empty?
raise ArgumentError, "#{errors.join(', ')}"
Expand Down

0 comments on commit c7f3f41

Please sign in to comment.