Skip to content

Commit

Permalink
Add en-SG unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jremes-foss authored and stympy committed Sep 8, 2016
1 parent 5e23fa5 commit fed61e9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/test_en_sg_locale.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestEnSgLocale < Test::Unit::TestCase
def setup
@previous_locale = Faker::Config.locale
Faker::Config.locale = 'en-SG'
end

def teardown
Faker::Config.locale = @previous_locale
end

def test_en_sg_methods
assert Faker::Name.male_first_name.is_a? String
assert Faker::Name.last_name.is_a? String
assert Faker::Name.female_first_name.is_a? String
assert Faker::Name.male_english_name.is_a? String
assert Faker::Name.female_english_name.is_a? String
assert Faker::Address.streets.is_a? String
end

def test_en_sg_default_country
assert_equal('Singapore', Faker::Address.default_country)
end
end

0 comments on commit fed61e9

Please sign in to comment.