Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bomb hard when no initializer found.

  • Loading branch information...
commit 16eaf2d80277415465f57468f69102b634f5371d 1 parent ca118be
@jnunemaker jnunemaker authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/unit/test_railtie.rb
View
5 test/unit/test_railtie.rb
@@ -13,6 +13,11 @@ def run_initializer(mod, name)
initializer = mod.initializers.detect do |i|
i.name == name
end
+
+ if initializer.nil?
+ raise 'Initializer not found'
+ end
+
initializer.block.arity == -1 ? initializer.run : initializer.run(FakeRails)
# mongo_mapper.prepare_dispatcher takes a Rails app as its one arg,
# set_clear_dependencies_hook takes no args
Please sign in to comment.
Something went wrong with that request. Please try again.