Skip to content

Commit

Permalink
Merge 7fc3a68 into 87859cf
Browse files Browse the repository at this point in the history
  • Loading branch information
railsmechanic committed Jan 5, 2016
2 parents 87859cf + 7fc3a68 commit db8dd4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/bic_validation/bic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ def of_valid_length?
end

def of_valid_format?
@code =~ format
!!(@code =~ format)
end

def has_valid_country_code?
country_codes.include? country
country_codes.include?(country)
end

def has_valid_location_code?
# WTF? http://de.wikipedia.org/wiki/ISO_9362
location[0] =~ /[^01]/ && location[1] =~ /[^O]/
!!(location[0] =~ /[^01]/ && location[1] =~ /[^O]/)
end

def known?
Expand Down
4 changes: 2 additions & 2 deletions spec/bic_validation/bic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module BicValidation
subject { @bic }

describe '#valid?' do
it { should be_valid }
it { expect([true, false]).to include(subject.valid?) }
end

describe '#known?' do
Expand Down Expand Up @@ -55,7 +55,7 @@ module BicValidation
subject { @bic }

describe '#valid?' do
it { should be_valid }
it { expect([true, false]).to include(subject.valid?) }
end

describe '#known?' do
Expand Down

0 comments on commit db8dd4b

Please sign in to comment.