Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
update run
Commit Description:
update run
# This test helper loads the grader's environment and rails environment
GRADER_ENV = 'test'
require File . join ( File . dirname ( __FILE__ ), '../config/environment' )
# this shall be removed soon
RAILS_ENV = Grader :: Configuration . get_instance . rails_env
require RAILS_ROOT + '/config/environment'
# make sure not to access real database!
# taken from http://blog.jayfields.com/2006/06/ruby-on-rails-unit-tests.html
class UnitTest
def self . TestCase
class << ActiveRecord :: Base
def connection
raise 'You cannot access the database from a unit test'
# raise InvalidActionError, 'You cannot access the database from a unit test', caller
end
end
Test :: Unit :: TestCase
end
end
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings