Module: ActiveDecorator::RSpec
- Defined in:
- lib/active_decorator/rspec.rb,
lib/active_decorator/rspec/version.rb
Defined Under Namespace
Modules: HelperMethods
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.included(config) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/active_decorator/rspec.rb', line 15 def self.included(config) config.before :each do ActiveDecorator::ViewContext.current = begin controller = Class.new(ActionController::Base).new controller.request = ActionController::TestRequest.new view_context = controller.view_context view_context end end ::RSpec::Core::ExampleGroup.send(:include, HelperMethods) end |