Sha256: 8c3258b43a7fcb987a9c3a43c18d56db60a0d899d42fef34e7edcb4371e4e4ac
Contents?: true
Size: 878 Bytes
Versions: 1
Compression:
Stored size: 878 Bytes
Contents
require 'rubygems' require 'active_support' require 'action_view' require File.join(File.dirname(__FILE__), '..', 'init') unless defined?(IRB) require 'active_support/test_case' require 'shoulda' end # fake global rails object Rails = Object.new Rails.class_eval do def root; @pathname ||= Pathname.new('/this/is/just/for/testing/page_title_helper') end def env; "test" end end # Mock ActionView a bit to allow easy (fake) template assignment class TestView < ActionView::Base def initialize(controller_path = nil, action = nil) @controller = ActionView::TestCase::TestController.new @controller.controller_path = controller_path self.params[:action] = action if action end def controller!(controller_path, action) @controller.controller_path = controller_path self.params[:action] = action end def controller @controller end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
page_title_helper-2.1.0 | test/test_helper.rb |