You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported here, there is a test that seems flaky at first.
The code runs this generator: ``Faker::Sport.sport(include_ancient: true)`, and sometimes raises the following error:
Error: test_sport_with_ancient_allowed(TestFakerSports): TypeError: no implicit conversion of Array into String
/home/runner/work/faker/faker/test/faker/sports/test_faker_sports.rb:15:in `test_sport_with_ancient_allowed'
12: end
13:
14: def test_sport_with_ancient_allowed
=> 15: assert_match(/\w+/, @tester.sport(include_ancient: true))
16: end
17:
18: def test_sport_with_unusual_allowed
To Reproduce
Faker::VERSION
=> "2.23.0"
Use the reproduction script below to reproduce the issue:
require 'faker'
1_000.times do |i|
sport = Faker::Sport.sport(include_ancient: true)
if !sport.is_a?(String)
raise "sport should be a string: #{sport.inspect}"
end
end
# => sport should be a string: ["Boxing", "Chariot racing", "Discus", "Horse racing", "Long jump", "Pankration", "Pentathlon", "Running", "Wrestling"] (RuntimeError)
Expected behavior
Generator should return a string
The text was updated successfully, but these errors were encountered:
Describe the bug
There seems to be a bug on the sports generator.
As reported here, there is a test that seems flaky at first.
The code runs this generator: ``Faker::Sport.sport(include_ancient: true)`, and sometimes raises the following error:
To Reproduce
Use the reproduction script below to reproduce the issue:
Expected behavior
Generator should return a string
The text was updated successfully, but these errors were encountered: