Show More
Commit Description:
add a new modified sandbox "box"...
Commit Description:
add a new modified sandbox "box"
The original file was pulled from moe (git://git.ucw.cz/moe.git)
by Martin Mares's commit on Sun Jul 29 23:53:56 2012 +0200
The modification is to make it separately compilable and add more option
to specify additional argument to the program. (Please see usage guide)
run `gcc -o box -std=c99 box64-new.c` to compile.
References:
File last commit:
Show/Diff file:
Action:
test/spec_helper.rb
| 25 lines
| 709 B
| text/x-ruby
| RubyLexer
|
|
r23 | |||
# 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 | ||||