Sha256: 5fe469d4698614d2432e08a8206a5476d52c562d3e817dc8af6678840807d293
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
# encoding: utf-8 require 'helper' class TestLoremCN < Test::Unit::TestCase def test_paragraph assert Faker::LoremCN.paragraph.length >= 3*4*2 end def test_sentence assert Faker::LoremCN.sentence.length >= 4*2 end def test_paragraphs assert Faker::LoremCN.paragraphs.length >= 2 end def test_paragraphs_is_not_a_string_representation_of_an_array assert_not_match /[\[\]]+/, [Faker::LoremCN.paragraphs].flatten.join(' ') end def test_paragraphs_is_an_array assert Faker::LoremCN.paragraphs.class == Array end def test_sentences assert Faker::LoremCN.sentences.length >= 2 end def test_sentences_is_an_array assert Faker::LoremCN.sentences.class == Array end def test_sentences_via_to_s_produces_string_terminated_with_period string = Faker::LoremCN.sentences.to_s 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 >= 1 end end
Version data entries
6 entries across 6 versions & 1 rubygems