Sha256: ff421156edcee49a5bd11cab78d17afc43b61bd7cf1a2c32906ed831488eec3e

Contents?: true

Size: 846 Bytes

Versions: 7

Compression:

Stored size: 846 Bytes

Contents

# frozen_string_literal: true

require 'helper'

class TestHipsterIpsum < Test::Unit::TestCase
  include DeterministicHelper

  assert_methods_are_deterministic(
    FFaker::HipsterIpsum,
    :paragraph, :paragraphs, :sentence, :sentences, :word, :words
  )

  TEST_REGEX = /\+1|[ a-z]+/i.freeze

  def test_paragraph
    assert_match(TEST_REGEX, FFaker::HipsterIpsum.paragraph)
  end

  def test_sentence
    assert_match(TEST_REGEX, FFaker::HipsterIpsum.sentence)
  end

  def test_paragraphs
    assert_match(TEST_REGEX, FFaker::HipsterIpsum.paragraphs.join(' '))
  end

  def test_sentences
    assert_match(TEST_REGEX, FFaker::HipsterIpsum.sentences.join(' '))
  end

  def test_words
    assert_match(TEST_REGEX, FFaker::HipsterIpsum.words.join(' '))
  end

  def test_word
    assert_match(TEST_REGEX, FFaker::HipsterIpsum.word)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ffaker-2.18.0 test/test_hipster_ipsum.rb
ffaker-2.17.0 test/test_hipster_ipsum.rb
ffaker-2.16.0 test/test_hipster_ipsum.rb
ffaker-2.15.0 test/test_hipster_ipsum.rb
ffaker-2.14.0 test/test_hipster_ipsum.rb
ffaker-2.13.0 test/test_hipster_ipsum.rb
ffaker-2.12.0 test/test_hipster_ipsum.rb