Module: Capybara::Simulated::MinitestTrace
- Defined in:
- lib/capybara/simulated/minitest.rb
Class Method Summary collapse
-
.real_failures(test) ⇒ Object
Skips aren’t failures for outcome purposes.
-
.source_file(test) ⇒ Object
Where the test method is defined, as ‘path:line` (best effort).
Class Method Details
.real_failures(test) ⇒ Object
Skips aren’t failures for outcome purposes. ‘::Minitest` —unqualified `Minitest` here resolves to `Capybara::Minitest` (Capybara ships that submodule), which has no `Skip`.
33 34 35 |
# File 'lib/capybara/simulated/minitest.rb', line 33 def real_failures(test) test.failures.reject {|f| f.is_a?(::Minitest::Skip) } end |
.source_file(test) ⇒ Object
Where the test method is defined, as ‘path:line` (best effort).
23 24 25 26 27 28 |
# File 'lib/capybara/simulated/minitest.rb', line 23 def source_file(test) loc = test.class.instance_method(test.name).source_location loc && loc.join(':') rescue NameError nil end |