Class: Applitools::Selenium::TestList
- Inherits:
-
Array
- Object
- Array
- Applitools::Selenium::TestList
- Defined in:
- lib/applitools/selenium/test_list.rb
Instance Method Summary collapse
Instance Method Details
#<<(value) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/applitools/selenium/test_list.rb', line 4 def <<(value) raise( Applitools::EyesIllegalArgument, "Expected value to be instance of Applitools::Selenium::RunningTest but got #{value.class} instead" ) unless value.is_a? Applitools::Selenium::RunningTest super end |
#push(*args) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/applitools/selenium/test_list.rb', line 12 def push(*args) wrong_values = args.select { |a| !a.is_a? Applitools::Selenium::RunningTest } raise( Applitools::EyesIllegalArgument, "Expected values to contain only Applitools::Selenium::RunningTest instances, " \ "but got [#{wrong_values.map(&:class).join(', ')}]" ) unless wrong_values.empty? super end |