Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added en-SG unit tests #618

Merged
merged 1 commit into from
Sep 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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