Skip to content

Commit

Permalink
Merge branch 'master' of github.com:houen/minitest-rerun-failed
Browse files Browse the repository at this point in the history
  • Loading branch information
houen committed Apr 25, 2024
2 parents f371b7b + a62bf22 commit 02d0d52
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 31 deletions.
27 changes: 4 additions & 23 deletions .rubocop.yml
@@ -1,24 +1,5 @@
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
# Omakase Ruby styling for Rails
inherit_gem:
rubocop-rails-omakase: rubocop.yml

Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes

Layout/LineLength:
Enabled: true
Max: 200

Metrics/MethodLength:
Enabled: false

Metrics/AbcSize:
Max: 19

Style/ConditionalAssignment:
Enabled: false
# Your own specialized rules go here
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -8,6 +8,6 @@ gemspec
gem "minitest"
gem "minitest-reporters"
gem "rake"
gem "rubocop"
gem "rubocop-minitest"
gem "rubocop-rake"
gem "rubocop-rails-omakase", require: false, group: :development
35 changes: 34 additions & 1 deletion Gemfile.lock
Expand Up @@ -8,18 +8,37 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
ansi (1.5.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.7)
builder (3.2.4)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
minitest (5.14.4)
minitest-reporters (1.4.3)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
mutex_m (0.2.0)
parallel (1.20.1)
parser (3.0.2.0)
ast (~> 2.4.1)
rack (3.0.10)
rainbow (3.0.0)
rake (13.0.6)
regexp_parser (2.1.1)
Expand All @@ -37,9 +56,23 @@ GEM
parser (>= 3.0.1.1)
rubocop-minitest (0.15.0)
rubocop (>= 0.90, < 2.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.15.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-rails-omakase (1.0.0)
rubocop
rubocop-minitest
rubocop-performance
rubocop-rails
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.11.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)

PLATFORMS
Expand All @@ -53,8 +86,8 @@ DEPENDENCIES
minitest-reporters
minitest-rerun-failed!
rake
rubocop
rubocop-minitest
rubocop-rails-omakase
rubocop-rake

BUNDLED WITH
Expand Down
29 changes: 29 additions & 0 deletions bin/rubocop
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'rubocop' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("rubocop", "rubocop")
6 changes: 3 additions & 3 deletions minitest_rerun_failed.gemspec
Expand Up @@ -5,8 +5,8 @@ require_relative "lib/minitest_rerun_failed/version"
Gem::Specification.new do |spec|
spec.name = "minitest-rerun-failed"
spec.version = MinitestRerunFailed::VERSION
spec.authors = ["Søren Houen"]
spec.email = ["s@houen.net"]
spec.authors = [ "Søren Houen" ]
spec.email = [ "s@houen.net" ]

spec.summary = "Easily rerun failed tests with Minitest"
spec.homepage = "https://www.github.com/houen/minitest-rerun-failed"
Expand All @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.require_paths = [ "lib" ]

# Uncomment to register a new dependency of your gem
spec.add_runtime_dependency "minitest", "~> 5.0", ">= 5.0.0"
Expand Down
6 changes: 3 additions & 3 deletions test/real/minitest_rerun_failed_test.rb
Expand Up @@ -75,15 +75,15 @@ def test_it_succeeds
end

def test_that_it_has_a_version_number
refute_nil ::MinitestRerunFailed::VERSION
assert_not_nil ::MinitestRerunFailed::VERSION
end

def test_it_writes_failed_tests_to_stdout
refute_empty fail_self_console_output
assert_not_empty fail_self_console_output
end

def test_it_writes_failed_tests_to_file
refute_empty fail_self_file_output
assert_not_empty fail_self_file_output
end

def test_it_prints_failed_tests_with_seed
Expand Down

0 comments on commit 02d0d52

Please sign in to comment.