Sha256: faf97506cbe133d7555f98d8858fd9f91a38ae1ccc5917fc1bb101b8bb03a185

Contents?: true

Size: 659 Bytes

Versions: 1

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerFunnyName < Test::Unit::TestCase
  def setup
    @tester = Faker::FunnyName
  end

  def test_name
    res = @tester.name
    assert res.is_a?(String) && !res.empty?
  end

  def test_two_word_name
    res = @tester.two_word_name
    assert res.count(' ') == 1
  end

  def test_three_word_name
    res = @tester.three_word_name
    assert res.count(' ') == 2
  end

  def test_four_word_name
    res = @tester.four_word_name
    assert res.count(' ') == 3
  end

  def test_name_with_initial
    res = @tester.name_with_initial
    assert res.count('.').positive?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logstash-output-scalyr-0.1.7 vendor/bundle/jruby/2.5.0/bundler/gems/faker-e1bd4a5a5777/test/faker/default/test_faker_funny_name.rb