Skip to content

Commit

Permalink
Remove conditional Ruby 2.7 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski committed Jun 15, 2024
1 parent 2bbe066 commit af79501
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false # <-- Can reenable this after dropping 2.7
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run tests for Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
Expand Down
6 changes: 1 addition & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ gem "rake"
gem "minitest"
gem "standard"
gem "m"

# Remove branch after 2.7 is dropped
if RUBY_VERSION > "3"
gem "mocktail"
end
gem "mocktail"
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GEM
rake (>= 0.9.2.2)
method_source (1.0.0)
minitest (5.19.0)
mocktail (2.0.0)
sorbet-eraser (~> 0.3.1)
sorbet-runtime (~> 0.5.9204)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
Expand All @@ -43,6 +46,8 @@ GEM
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
sorbet-eraser (0.3.1)
sorbet-runtime (0.5.11435)
standard (1.33.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
Expand All @@ -62,6 +67,7 @@ PLATFORMS
DEPENDENCIES
m
minitest
mocktail
rake
standard
standard-performance!
Expand Down
3 changes: 0 additions & 3 deletions test/standard/performance/builds_ruleset_test.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require "test_helper"

# Remove after 2.7 is dropped
return unless RUBY_VERSION > "3"

module Standard::Performance
class BuildsRulesetTest < Minitest::Test
def setup
Expand Down
13 changes: 5 additions & 8 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

require "minitest/autorun"

# Remove branch after 2.7 is dropped
if RUBY_VERSION > "3"
require "mocktail"
require "mocktail"

class Minitest::Test
include Mocktail::DSL
class Minitest::Test
include Mocktail::DSL

def teardown
Mocktail.reset
end
def teardown
Mocktail.reset
end
end

0 comments on commit af79501

Please sign in to comment.