Sha256: 90e1053a7e8d33b45cc8937e1ac41a2f42fd93876e29173d93bab9fb44950cee

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

require 'simplecov'
require 'pry'
require 'minitest/autorun'
require 'minitest/pride'
require 'minitest/hell'

SimpleCov.start do
  command_name 'MiniTest::Spec'
  add_filter   '/test/'
end unless ENV['no_simplecov']

module MiniTest
  class Spec
    class << self
      alias_method :context, :describe
    end
  end
end

require 'mocha/setup'

GC.disable

ENV['VEDEU_TERM'] = 'xterm-truecolor'

require 'vedeu'

module Vedeu
  def self.reset_all!
    Vedeu::Buffers.reset
    Vedeu::Configuration.reset
    Vedeu.events.reset
    Vedeu::Focus.reset
    Vedeu::Groups.reset
    Vedeu::Interfaces.reset
  end
end

module MyMiniTestPlugin
  # Code to run before every test case
  def before_setup
    super
    Vedeu.reset_all!
  end

  # Code to run after every test case
  def after_teardown
    Vedeu.reset_all!
    super
  end
end

class MiniTest::Spec
  include MyMiniTestPlugin
end

# commented out by default (makes tests slower)
# require 'minitest/reporters'
# Minitest::Reporters.use!(
  # Minitest::Reporters::DefaultReporter.new({ color: true, slow_count: 5 }),
  # Minitest::Reporters::SpecReporter.new
# )

# trace method execution with (optionally) local variables
# require 'vedeu/support/log'
# Vedeu::Trace.call({ watched: 'call', klass: /^Vedeu/ })

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.1.19 test/test_helper.rb