Module: Pancake::Test::Helpers
- Defined in:
- lib/pancake/test/helpers.rb
Instance Method Summary collapse
Instance Method Details
#clear_constants(*classes) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/pancake/test/helpers.rb', line 4 def clear_constants(*classes) classes.flatten.each do |klass| begin Object.class_eval do remove_const klass end rescue => e end end end |
#env_for(path = "/", opts = {}) ⇒ Object
clear_constnat3
15 16 17 |
# File 'lib/pancake/test/helpers.rb', line 15 def env_for(path = "/", opts = {}) Rack::MockRequest.env_for(path, opts) end |