lib/rspec/rails/example/cell_example_group.rb in rspec-cells-0.1.0 vs lib/rspec/rails/example/cell_example_group.rb in rspec-cells-0.1.1

- old
+ new

@@ -4,10 +4,11 @@ extend ActiveSupport::Concern extend RSpec::Rails::ModuleInclusion include RSpec::Rails::RailsExampleGroup include Cell::TestCase::TestMethods + include ActionController::UrlFor if defined?(Webrat) include Webrat::Matchers include Webrat::Methods end @@ -38,9 +39,18 @@ end end module InstanceMethods attr_reader :controller, :routes + + def method_missing(method, *args, &block) + # Send the route helpers to the application router. + if @routes && @routes.named_routes.helpers.include?(method) + @controller.send(method, *args, &block) + else + super + end + end end included do metadata[:type] = :cell before do # called before every it.