Skip to content

Commit 3714a93

Browse files
committed
testing: simplecov, byebug, minitest
1 parent a47f532 commit 3714a93

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

.simplecov

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SimpleCov.start

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ source "https://rubygems.org"
22

33
# Specify your gem's dependencies in arms.gemspec
44
gemspec
5+
gem 'byebug'

arms.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ Gem::Specification.new do |spec|
3030
spec.add_development_dependency "bundler", "~> 2.0"
3131
spec.add_development_dependency "rake", "~> 10.0"
3232
spec.add_development_dependency "minitest", "~> 5.0"
33+
spec.add_development_dependency "minitest-reporters"
34+
spec.add_development_dependency "simplecov"
3335
end

test/test_helper.rb

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
2-
require "arms"
1+
proc { |p| $:.unshift(p) unless $:.any? { |lp| File.expand_path(lp) == p } }.call(File.expand_path('../lib', File.dirname(__FILE__)))
32

4-
require "minitest/autorun"
3+
require 'simplecov'
4+
require 'byebug'
5+
6+
# NO EXPECTATIONS
7+
ENV["MT_NO_EXPECTATIONS"] = ''
8+
9+
require 'minitest/autorun'
10+
require 'minitest/reporters'
11+
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
12+
13+
class ARMSSpec < Minitest::Spec
14+
end
15+
16+
# register this to be the base class for specs instead of Minitest::Spec
17+
Minitest::Spec.register_spec_type(//, ARMSSpec)
18+
19+
require 'arms'

0 commit comments

Comments
 (0)