Sha256: 1751193b32fb1a9e0803cb5400167903e17277bc99b5f2ff50638f981423d91e
Contents?: true
Size: 901 Bytes
Versions: 1
Compression:
Stored size: 901 Bytes
Contents
# frozen_string_literal: true require_relative 'helper' require 'ostruct' class TestUnits < Test::Unit::TestCase include DeterministicHelper assert_methods_are_deterministic( FFaker::Unit, :time_name, :time_abbr, :temperature_name, :temperature_abbr ) def setup @tester = FFaker::Unit @time_units = @tester::TIME_UNITS @temperature_units = @tester::TEMPERATURE_UNITS end def test_time_name assert_include @time_units.map { |unit| unit[:name] }, @tester.time_name end def test_time_abbr assert_include @time_units.map { |unit| unit[:abbreviation] }, @tester.time_abbr end def test_temperature_name assert_include @temperature_units.map { |unit| unit[:name] }, @tester.temperature_name end def test_temperature_abbr assert_include \ @temperature_units.map { |unit| unit[:abbreviation] }, @tester.temperature_abbr end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ffaker-2.23.0 | test/test_units.rb |