Skip to content

Commit 44f783e

Browse files
Introduce mocha
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
1 parent 87786c4 commit 44f783e

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Gemfile.lock

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ GEM
113113
marcel (1.0.2)
114114
mini_mime (1.1.5)
115115
minitest (5.20.0)
116+
mocha (2.1.0)
117+
ruby2_keywords (>= 0.0.5)
116118
mutex_m (0.1.2)
117119
net-imap (0.4.1)
118120
date
@@ -232,6 +234,7 @@ PLATFORMS
232234
x86_64-linux
233235

234236
DEPENDENCIES
237+
mocha
235238
puma
236239
sqlite3
237240
standard

suspenders.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ Gem::Specification.new do |spec|
2727

2828
spec.add_dependency "rails", Suspenders::RAILS_VERSION
2929

30+
spec.add_development_dependency "mocha"
3031
spec.add_development_dependency "standard"
3132
end

test/test_helper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
require_relative "../test/dummy/config/environment"
55
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
66
require "rails/test_help"
7+
require "mocha/minitest"
78

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

0 commit comments

Comments
 (0)