Skip to content

Commit

Permalink
Utilize new Gemwork dependencies + test support
Browse files Browse the repository at this point in the history
This simplifies definition and update of gem dependencies and
utilization of test/test_helper.rb support/requires.
  • Loading branch information
pdobb committed Nov 26, 2023
1 parent 2422b37 commit 29d37ba
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 49 deletions.
29 changes: 11 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ GEM
byebug (11.1.3)
coderay (1.1.3)
diff-lcs (1.5.0)
docile (1.4.0)
e2mmap (0.1.0)
gemwork (0.1.1)
minitest
minitest-reporters
much-stub
reek
rubocop
rubocop-minitest
rubocop-performance
rubocop-rake
yard
jaro_winkler (1.5.6)
json (2.6.3)
kramdown (2.4.0)
Expand All @@ -41,11 +50,6 @@ GEM
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pdobb-style (0.1.3)
rubocop
rubocop-minitest
rubocop-performance
rubocop-rake
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -85,12 +89,6 @@ GEM
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
solargraph (0.49.0)
backport (~> 1.2)
benchmark
Expand Down Expand Up @@ -120,16 +118,11 @@ DEPENDENCIES
benchmark-ips
bundler
byebug
minitest
minitest-reporters
much-stub
gemwork
object_identifier!
pdobb-style
pry
pry-byebug
rake
reek
simplecov
solargraph

BUNDLED WITH
Expand Down
8 changes: 6 additions & 2 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/usr/bin/env bash

# Recompile and install Gemwork locally.
if [ -n "$REBUILD_GEMWORK" ]; then
( cd ~/dev/gemwork && bin/setup && rake install:local )
fi

set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
5 changes: 0 additions & 5 deletions object_identifier.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler"
spec.add_development_dependency "byebug"
spec.add_development_dependency "gemwork"
spec.add_development_dependency "minitest"
spec.add_development_dependency "minitest-reporters"
spec.add_development_dependency "much-stub"
spec.add_development_dependency "pry"
spec.add_development_dependency "pry-byebug"
spec.add_development_dependency "rake"
spec.add_development_dependency "reek"
spec.add_development_dependency "simplecov"
spec.add_development_dependency "solargraph"
end
28 changes: 4 additions & 24 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
# frozen_string_literal: true

require "simplecov"
SimpleCov.start do
add_filter "/bin/"
add_filter "/test/"
end
puts "SimpleCov enabled."
require "gemwork/test/support/simplecov"

$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require "object_identifier"

require "minitest/autorun"
require "minitest/reporters"
require "pry"

require "much-stub"

Minitest::Test.make_my_diffs_pretty!
reporter_options = { color: true }
Minitest::Reporters.use!(
Minitest::Reporters::DefaultReporter.new(reporter_options))

def context(...)
describe(...)
end

class Minitest::Spec
after do
MuchStub.unstub!
end
end
require "gemwork/test/support/reporters"
require "gemwork/test/support/much_stub"
require "gemwork/test/support/spec_dsl"

0 comments on commit 29d37ba

Please sign in to comment.