Sha256: 1ae4e18010a44a7bac8d4a23bba8549dee486aeb22278111740e84f41d0df37b

Contents?: true

Size: 485 Bytes

Versions: 2

Compression:

Stored size: 485 Bytes

Contents

require "time"

module Petitest
  module SubscriberConcerns
    module TimeConcern
      # @return [Time, nil]
      attr_accessor :finished_at

      # @return [Time, nil]
      attr_accessor :started_at

      # @note Override
      def after_running_test_plan(test_plan)
        super
        self.finished_at = ::Time.now
      end

      # @note Override
      def before_running_test_plan(test_plan)
        super
        self.started_at = ::Time.now
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
petitest-0.3.1 lib/petitest/subscriber_concerns/time_concern.rb
petitest-0.3.0 lib/petitest/subscriber_concerns/time_concern.rb