Skip to content

Commit

Permalink
some adjustments to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Oga authored and Emmanuel Oga committed Nov 6, 2011
1 parent 5c0561c commit 840a3bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion test/test_faker_internet.rb
Expand Up @@ -18,7 +18,8 @@ def test_free_email
end

def test_disposable_email
assert @tester.disposable_email.match(/.+@(mailinator\.com|suremail\.info|spamherelots\.com|binkmail\.com|safetymail\.info)/)
assert @tester.disposable_email.match(
/.+@(mailinator\.com|suremail\.info|spamherelots\.com|binkmail\.com|safetymail\.info)/)
end

def test_user_name
Expand Down
12 changes: 6 additions & 6 deletions test/test_hipster_ipsum.rb
Expand Up @@ -3,27 +3,27 @@
class TestHipsterIpsum < Test::Unit::TestCase

def test_paragraph
assert_match /[ a-z]+/, Faker::HipsterIpsum.paragraph
assert_match /1\+|[ a-z]+/i, Faker::HipsterIpsum.paragraph
end

def test_sentence
assert_match /[ a-z]+/, Faker::HipsterIpsum.sentence
assert_match /1\+|[ a-z]+/i, Faker::HipsterIpsum.sentence
end

def test_paragraphs
assert_match /[ a-z]+/, Faker::HipsterIpsum.paragraphs.join(" ")
assert_match /1\+|[ a-z]+/i, Faker::HipsterIpsum.paragraphs.join(" ")
end

def test_sentences
assert_match /[ a-z]+/, Faker::HipsterIpsum.sentences.join(" ")
assert_match /1\+|[ a-z]+/i, Faker::HipsterIpsum.sentences.join(" ")
end

def test_words
assert_match /[ a-z]+/, Faker::HipsterIpsum.words.join(" ")
assert_match /1\+|[ a-z]+/i, Faker::HipsterIpsum.words.join(" ")
end

def test_word
assert_match /[a-z]+/, Faker::HipsterIpsum.word
assert_match /1\+|[a-z]+/i, Faker::HipsterIpsum.word
end

end
6 changes: 3 additions & 3 deletions test/test_lorem_cn.rb
Expand Up @@ -2,7 +2,7 @@
require 'helper'

class TestLoremCN < Test::Unit::TestCase

def test_paragraph
assert Faker::LoremCN.paragraph.length >= 3*4*2
end
Expand Down Expand Up @@ -32,12 +32,12 @@ def test_sentences_via_to_s_produces_string_terminated_with_period
assert string.class == String
assert string[-1] == '。'
end

def test_words
assert Faker::LoremCN.words.length >= 2
end

def test_word
assert Faker::LoremCN.word.length >= 2
assert Faker::LoremCN.word.length >= 1
end
end

0 comments on commit 840a3bd

Please sign in to comment.