Skip to content

Commit

Permalink
reset rspec reporter start time
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattades committed May 15, 2024
1 parent 373c4c4 commit b76f493
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/cyperful/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ def self.pop_run_options!
def enqueue_reset
at_exit do
if Cyperful.rspec?
RSpec.configuration.reset # private API. this resets the test reporter
RSpec.configuration.start_time = RSpec::Core::Time.now # this needs to be reset
RSpec.world.reset # private API. this unloads constants and clears examples
RSpec::Core::Runner.invoke # this reloads the test suite
RSpec::Core::Runner.invoke # this reloads and starts the test suite
elsif Cyperful.minitest?
# reload test-suite code on reset (for `setup_file_listener`)
# TODO: also reload dependent files
Expand Down

0 comments on commit b76f493

Please sign in to comment.