/
test_deprecate_dota.rb
41 lines (33 loc) · 1.02 KB
/
test_deprecate_dota.rb
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
# frozen_string_literal: true
require_relative '../../test_helper'
class TestDeprecateDota < Test::Unit::TestCase
def setup
@tester = Faker::Dota
@heroes = %w[abaddon alchemist axe beastmaster brewmaster bristleback centaur
chaos_knight clockwerk doom dragon_knight earth_spirit earthshaker
elder_titan huskar io kunkka legion_commander lifestealer lycan
magnus night_stalker omniknight phoenix pudge sand_king slardar
spirit_breaker sven tidehunter timbersaw tiny treant_protector tusk
underlord undying wraith_king]
end
def test_hero
assert @tester.hero.match(/\w+/)
end
def test_item
assert @tester.item.match(/\w+/)
end
def test_team
assert @tester.team.match(/\w+/)
end
def test_player
assert @tester.player.match(/\w+/)
end
def test_quotes
assert @tester.quote.match(/\w+/)
end
def test_heroes_quotes
@heroes.each do |hero|
assert_match(/\w+/, @tester.quote(hero))
end
end
end