Skip to content

Commit eb9ac99

Browse files
committed
Merge pull request #1099 from wanelo-pair/without-ruby-gems
Allow rspec-rails to load without Rubygems loaded
2 parents bb513b7 + c836068 commit eb9ac99

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/rspec/rails/adapters.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
module RSpec
66
module Rails
77
if ::Rails::VERSION::STRING >= '4.1.0'
8-
gem 'minitest'
8+
if defined?(Kernel.gem)
9+
gem 'minitest'
10+
else
11+
require 'minitest'
12+
end
913
require 'minitest/assertions'
1014
# Constant aliased to either Minitest or TestUnit, depending on what is
1115
# loaded.

0 commit comments

Comments
 (0)