2011-06-30 18:19:48 -04:00
|
|
|
require 'bundler/setup'
|
2012-05-09 18:58:19 -04:00
|
|
|
require 'ammeter/init'
|
2012-04-28 15:26:57 -04:00
|
|
|
require 'rails'
|
|
|
|
|
2012-07-16 12:43:29 -04:00
|
|
|
require 'action_view'
|
2011-08-28 00:52:03 -04:00
|
|
|
Bundler.require
|
2011-10-24 13:48:53 -04:00
|
|
|
|
2012-05-07 22:24:01 -04:00
|
|
|
require './spec/support/samples/active_record'
|
|
|
|
require './spec/support/samples/decorator'
|
|
|
|
require './spec/support/samples/decorator_with_application_helper'
|
2012-05-10 20:50:22 -04:00
|
|
|
require './spec/support/samples/decorator_with_special_methods'
|
2012-10-14 18:35:25 -04:00
|
|
|
require './spec/support/samples/finder_decorator'
|
2012-05-07 22:24:01 -04:00
|
|
|
require './spec/support/samples/namespaced_product'
|
|
|
|
require './spec/support/samples/namespaced_product_decorator'
|
|
|
|
require './spec/support/samples/non_active_model_product'
|
|
|
|
require './spec/support/samples/product'
|
|
|
|
require './spec/support/samples/product_decorator'
|
2012-08-30 09:00:37 -04:00
|
|
|
require './spec/support/samples/products_decorator'
|
2012-07-16 13:23:35 -04:00
|
|
|
require './spec/support/samples/sequel_product'
|
2012-05-07 22:24:01 -04:00
|
|
|
require './spec/support/samples/specific_product_decorator'
|
|
|
|
require './spec/support/samples/some_thing'
|
|
|
|
require './spec/support/samples/some_thing_decorator'
|
2012-10-31 20:16:09 -04:00
|
|
|
require './spec/support/samples/uninferrable_decorator_model'
|
2012-05-07 22:24:01 -04:00
|
|
|
require './spec/support/samples/widget'
|
|
|
|
require './spec/support/samples/widget_decorator'
|
2012-07-16 12:43:29 -04:00
|
|
|
|
2012-08-28 23:39:41 -04:00
|
|
|
require 'action_controller'
|
|
|
|
require 'action_controller/test_case'
|
|
|
|
|
2012-07-16 12:43:29 -04:00
|
|
|
module ActionController
|
|
|
|
class Base
|
2012-10-01 17:30:18 -04:00
|
|
|
Draper::System.setup_action_controller(self)
|
2012-07-16 12:43:29 -04:00
|
|
|
end
|
|
|
|
end
|
2012-08-22 21:45:55 -04:00
|
|
|
|
|
|
|
module ActiveRecord
|
|
|
|
class Relation
|
|
|
|
end
|
|
|
|
end
|
2012-08-28 23:39:41 -04:00
|
|
|
|
|
|
|
class ApplicationController < ActionController::Base
|
2012-08-30 12:12:37 -04:00
|
|
|
def hello_world
|
|
|
|
"Hello, World!"
|
|
|
|
end
|
2012-08-28 23:39:41 -04:00
|
|
|
helper_method :hello_world
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
class << Rails
|
|
|
|
undef application # Avoid silly Rails bug: https://github.com/rails/rails/pull/6429
|
|
|
|
end
|