Skip to content

Commit

Permalink
Merge pull request #840 from Shopify/at-require-mock
Browse files Browse the repository at this point in the history
Use `require_mock_gem` instead of hand-crafting the Gemfile
  • Loading branch information
Morriar committed Mar 4, 2022
2 parents 9ef7521 + 4ebe966 commit e990dd6
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions spec/tapioca/cli/gem_spec.rb
Expand Up @@ -171,11 +171,8 @@ def fizz; end
write("lib/bar.rb", BAR_RB)
end

@project.gemfile(<<~GEMFILE, append: true)
#{foo.gemfile_line}
#{bar.gemfile_line}
GEMFILE

@project.require_mock_gem(foo)
@project.require_mock_gem(bar)
@project.bundle_install

result = @project.tapioca("gem foo")
Expand Down Expand Up @@ -1308,12 +1305,9 @@ def baz(a, b, c); end
RB
end

@project.gemfile(<<~GEMFILE, append: true)
#{foo.gemfile_line}
#{bar.gemfile_line}
#{baz.gemfile_line}
GEMFILE

@project.require_mock_gem(foo)
@project.require_mock_gem(bar)
@project.require_mock_gem(baz)
@project.bundle_install

@project.write("sorbet/rbi/dsl/foo.rbi", <<~RBI)
Expand Down

0 comments on commit e990dd6

Please sign in to comment.