Skip to content

Commit

Permalink
fix 2.7 in build
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Jul 14, 2023
1 parent 8238837 commit fa57757
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ gem "rake"
gem "minitest"
gem "standard"
gem "m"
gem "mocktail"

# Remove branch after 2.7 is dropped
if RUBY_VERSION > "3"
gem "mocktail"
end
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ GEM
rake (>= 0.9.2.2)
method_source (1.0.0)
minitest (5.18.1)
mocktail (1.2.2)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
Expand Down Expand Up @@ -61,7 +60,6 @@ PLATFORMS
DEPENDENCIES
m
minitest
mocktail
rake
standard
standard-performance!
Expand Down
3 changes: 3 additions & 0 deletions test/standard/performance/builds_ruleset_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
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
14 changes: 9 additions & 5 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
require "standard/performance"

require "minitest/autorun"
require "mocktail"

class Minitest::Test
include Mocktail::DSL
# Remove branch after 2.7 is dropped
if RUBY_VERSION > "3"
require "mocktail"

def teardown
Mocktail.reset
class Minitest::Test
include Mocktail::DSL

def teardown
Mocktail.reset
end
end
end

0 comments on commit fa57757

Please sign in to comment.