Skip to content

Commit

Permalink
Move app and config into test
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Conover committed Sep 24, 2010
1 parent f14188f commit eac033b
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 2 additions & 7 deletions test/basic_test.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
require "rack/test"
require './test/test_helper'
require 'json'
require 'wrong'
require 'wrong/adapters/test_unit'
require "wrong/message/string_diff"
Wrong.config[:color] = true

require 'welcome_controller'
WelcomeController.append_view_path "test/app/views"

class BasicTest < Test::Unit::TestCase
include Rack::Test::Methods
Expand Down
7 changes: 5 additions & 2 deletions config/application.rb → test/config/application.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../boot', __FILE__)
require 'config/boot'

require "action_controller/railtie"
require "rails/test_unit/railtie"
Expand All @@ -9,8 +9,11 @@

module ActionPresenter
class Application < Rails::Application
config.filter_parameters += [:password]
config.active_support.deprecation = :stdout
config.secret_token = '8b9708cd5d4a96f541e04326467fc9c4b0c0a44c4d77b19632db2145fd1cf686d739f7d34a3ecce551c53dc8d31730e816cd332b3eececd95cc539b52e1aadde'
routes.draw do
root :to => "welcome#index"
match ':controller(/:action(/:id(.:format)))'
end
end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 3 additions & 7 deletions test/personas_test.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
require "rack/test"
require './test/test_helper'
require 'json'
require 'wrong'
require 'wrong/adapters/test_unit'
require "wrong/message/string_diff"
Wrong.config[:color] = true

require 'personas_controller'
require 'app/models/persona'
PersonasController.append_view_path "test/app/views"

class BasicTest < Test::Unit::TestCase
include Rack::Test::Methods
Expand Down
13 changes: 12 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
$LOAD_PATH.unshift './test'
$LOAD_PATH.unshift './test/app/controllers'
require 'config/application'
require 'rails/test_help'
require 'json'
require 'wrong'
require 'wrong/adapters/test_unit'
require "wrong/message/string_diff"
require "rack/test"
Wrong.config[:color] = true
ActionPresenter::Application.initialize!
require 'application_controller'
ApplicationController.append_view_path "test/app/views"

0 comments on commit eac033b

Please sign in to comment.