public
Description:
Homepage:
Clone URL: git://github.com/relevance/streamlined.git
streamlined / test / edge_rails_test_helper.rb
100644 17 lines (16 sloc) 0.735 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module EdgeRailsTestHelper
  # prepare our test environment by doing stuff that normally happens via the plugin init process
  def self.bootstrap_test_environment_for_edge
    ActionView::Base.send(:include, Streamlined::Helper)
    ActionController::Base.view_paths = [File.join(RAILS_ROOT, 'app', 'views')]
 
    %W(#{STREAMLINED_ROOT}/templates
#{STREAMLINED_ROOT}/templates/shared
#{STREAMLINED_ROOT}/templates/generic_views
#{STREAMLINED_ROOT}/templates/relationships/edit_views
#{STREAMLINED_ROOT}/templates/relationships/edit_views/filter_select
#{STREAMLINED_ROOT}/templates/relationships/show_views
).each do |path|
       ActionController::Base.append_view_path(path)
     end
  end
end