summaryrefslogtreecommitdiff
path: root/lib/rspec_flaky/example.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rspec_flaky/example.rb')
-rw-r--r--lib/rspec_flaky/example.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/rspec_flaky/example.rb b/lib/rspec_flaky/example.rb
deleted file mode 100644
index 3c1b05257a0..00000000000
--- a/lib/rspec_flaky/example.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# frozen_string_literal: true
-
-module RspecFlaky
- # This is a wrapper class for RSpec::Core::Example
- class Example
- delegate :status, :exception, to: :execution_result
-
- def initialize(rspec_example)
- @rspec_example = rspec_example.try(:example) || rspec_example
- end
-
- def uid
- @uid ||= Digest::MD5.hexdigest("#{description}-#{file}")
- end
-
- def example_id
- rspec_example.id
- end
-
- def file
- metadata[:file_path]
- end
-
- def line
- metadata[:line_number]
- end
-
- def description
- metadata[:full_description]
- end
-
- def attempts
- rspec_example.try(:attempts) || 1
- end
-
- private
-
- attr_reader :rspec_example
-
- def metadata
- rspec_example.metadata
- end
-
- def execution_result
- rspec_example.execution_result
- end
- end
-end