Sha256: d2368be76631eefe76b0933d78dca85d36c3e98d0c62f12c0c829410f41e45a7
Contents?: true
Size: 870 Bytes
Versions: 3
Compression:
Stored size: 870 Bytes
Contents
dir = File.dirname(File.expand_path(__FILE__)) $LOAD_PATH.unshift dir + '/../lib' require 'rubygems' require 'test/unit' begin require 'turn' rescue LoadError end require 'mocha' require 'copy' class Test::Unit::TestCase def self.test(name, &block) define_method("test_#{name.gsub(/\W/,'_')}", &block) if block end def self.setup(&block) define_method(:setup, &block) end def self.teardown(&block) define_method(:teardown, &block) end end module CopyAppSetup def app Copy::Server end def setup app.config do set :views, File.dirname(File.expand_path(__FILE__)) + '/test_app/views' end end def setup_auth(user, pass) app.config do set :admin_user, user set :admin_password, pass end end def authorize! setup_auth 'super', 'secret' authorize 'super', 'secret' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
copy-0.0.3 | test/test_helper.rb |
copy-0.0.2 | test/test_helper.rb |
copy-0.0.1 | test/test_helper.rb |