# encoding: utf-8 require 'action_controller/test_case' module Cells module AssertionsHelper # Sets up a mock controller for usage in render_cell. def setup @controller = Class.new(ActionController::Base).new @request = ::ActionController::TestRequest.new @response = ::ActionController::TestResponse.new @controller.request = @request @controller.response = @response @controller.params = {} end # Use this for functional tests of your application cells. # # Example: # should "spit out a h1 title" do # html = render_cell(:news, :latest) # assert_selekt html, "h1", "The latest and greatest!" def render_cell(*args) @controller.render_cell(*args) end # Invokes assert_select for the passed content string. # # Example: # html = "