Sha256: 674092b22000d8d720785fbab2de3388bf0a88203e193368bdbe0c329202fffb
Contents?: true
Size: 1.7 KB
Versions: 3
Compression:
Stored size: 1.7 KB
Contents
# wycats says... require 'rubygems' require 'bundler' Bundler.setup #require 'rubygems' require 'shoulda' require 'mocha' require 'mocha/integration' require 'cells' Cell::Base.add_view_path File.expand_path(File.dirname(__FILE__) + "/fixtures") puts Cell::Base.view_paths require 'apotomo' require 'apotomo/widget_shortcuts' require 'apotomo/rails/controller_methods' require 'apotomo/rails/view_methods' #require 'apotomo/assertions_helper' # Load test support files. Dir[File.join(File.dirname(__FILE__), *%w[support ** *.rb]).to_s].each { |f| require f } Test::Unit::TestCase.class_eval do include Apotomo::WidgetShortcuts include Apotomo::TestCaseMethods include Apotomo::AssertionsHelper def setup @controller = ApotomoController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @controller.request = @request @controller.response = @response @controller.params = {} @controller.session = @session = {} end end class ApotomoController < ActionController::Base include Apotomo::Rails::ControllerMethods end class MouseCell < Apotomo::StatefulWidget def eating; render; end end class RenderingTestCell < Apotomo::StatefulWidget attr_reader :brain attr_reader :rendered_children def jump jump_to_state :check_state end end # We need to setup a fake route for the controller tests. ActionController::Routing::Routes.draw do |map| map.connect 'apotomo/:action', :controller => 'apotomo' map.connect 'barn/:action', :controller => 'barn' end require File.join(File.dirname(__FILE__), '..', 'config/routes.rb') ### TODO: let rails engine handle that. module ::Rails def logger(*args); end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
apotomo-0.1.4 | test/test_helper.rb |
apotomo-0.1.3 | test/test_helper.rb |
apotomo-0.1.2 | test/test_helper.rb |