Skip to content

Commit

Permalink
Introduce mocha
Browse files Browse the repository at this point in the history
Use [mocha][] for mocking and stubbing. Specifically, this will aid with
testing that we correctly install a gem with bundler in our generators.

[mocha]: https://github.com/freerange/mocha
  • Loading branch information
stevepolitodesign committed Oct 30, 2023
1 parent 6bd58f2 commit 84e0c95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ GEM
marcel (1.0.2)
mini_mime (1.1.5)
minitest (5.20.0)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
mutex_m (0.1.2)
net-imap (0.4.1)
date
Expand Down Expand Up @@ -232,6 +234,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
mocha
puma
sqlite3
standard
Expand Down
1 change: 1 addition & 0 deletions suspenders.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ Gem::Specification.new do |spec|

spec.add_dependency "rails", Suspenders::RAILS_VERSION

spec.add_development_dependency "mocha"
spec.add_development_dependency "standard"
end
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require_relative "../test/dummy/config/environment"
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
require "rails/test_help"
require "mocha/minitest"

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_paths=)
Expand Down

0 comments on commit 84e0c95

Please sign in to comment.