File: test_food_pl.rb

package info (click to toggle)
ruby-ffaker 2.23.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,776 kB
  • sloc: ruby: 12,788; makefile: 8; sh: 1
file content (61 lines) | stat: -rw-r--r-- 1,194 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# frozen_string_literal: true

require_relative 'helper'

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

  assert_methods_are_deterministic(
    FFaker::FoodPL,
    :food, :processed, :unprocessed, :vegetable, :fruit,
    :meat, :herb, :spice, :fermented, :diary, :preserves
  )

  def setup
    @tester = FFaker::FoodPL
  end

  def test_food
    assert_match(/\w+/, @tester.food)
  end

  def test_processed
    assert_match(/\w+/, @tester.processed)
  end

  def test_unprocessed
    assert_match(/\w+/, @tester.unprocessed)
  end

  def test_vegetable
    assert_include(@tester::VEGETABLES, @tester.vegetable)
  end

  def test_fruit
    assert_include(@tester::FRUITS, @tester.fruit)
  end

  def test_herb
    assert_include(@tester::HERBS, @tester.herb)
  end

  def test_spice
    assert_include(@tester::SPICES, @tester.spice)
  end

  def test_meat
    assert_include(@tester::MEATS, @tester.meat)
  end

  def test_fermented
    assert_include(@tester::FERMENTED, @tester.fermented)
  end

  def test_diary
    assert_include(@tester::DIARY, @tester.diary)
  end

  def test_preserves
    assert_include(@tester::PRESERVES, @tester.preserves)
  end
end