File: test_faker_device.rb

package info (click to toggle)
ruby-faker 3.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,596 kB
  • sloc: ruby: 20,656; sh: 6; makefile: 6
file content (35 lines) | stat: -rw-r--r-- 706 bytes parent folder | download
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
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerDevice < Test::Unit::TestCase
  def setup
    @tester = Faker::Device
  end

  def test_model_name
    assert_match(/\w+/, @tester.model_name)
  end

  def test_platform
    assert_match(/\w+/, @tester.platform)
  end

  def test_version
    assert_predicate @tester.version, :positive?
    assert_operator @tester.version, :<=, 1000
  end

  def test_build_number
    assert_predicate @tester.build_number, :positive?
    assert_operator @tester.build_number, :<=, 500
  end

  def test_manufacturer
    assert_match(/\w+/, @tester.manufacturer)
  end

  def test_serial
    assert_match(/\w+/, @tester.serial)
  end
end