Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 173
- Log:
Updated to latest release of Beast according to the "getting started with
Beast" guide at:http://beast.caboo.se/forums/1/topics/381
This check-in includes frozen Edge Rails and has the beginnings of
configuration for the ROOL site included.
- Author:
- rool
- Date:
- Fri Mar 02 15:59:12 +0000 2007
- Size:
- 1513 Bytes
1 | ENV["RAILS_ENV"] = "test" |
2 | PASSWORD_SALT = 'beast' |
3 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") |
4 | require 'test_help' |
5 | |
6 | class Test::Unit::TestCase |
7 | self.use_transactional_fixtures = true |
8 | self.use_instantiated_fixtures = false |
9 | |
10 | def self.all_fixtures |
11 | fixtures :forums, :users, :posts, :topics, :moderatorships, :monitorships |
12 | end |
13 | |
14 | def assert_difference(object, method = nil, difference = 1) |
15 | initial_value = object.send(method) |
16 | yield |
17 | assert_equal initial_value + difference, object.send(method), "#{object}##{method}" |
18 | end |
19 | |
20 | def login_as(user) |
21 | @request.session[:user_id] = user ? users(user).id : nil |
22 | @request.session[:topics] = {} |
23 | end |
24 | |
25 | def authorize_as(user, mime_type = 'application/xml') |
26 | @request.env["HTTP_AUTHORIZATION"] = user ? "Basic #{Base64.encode64("#{users(user).login}:testy")}" : nil |
27 | end |
28 | |
29 | def logout |
30 | @request.session[:user_id] = nil |
31 | @controller.instance_variable_set("@current_user",nil) |
32 | end |
33 | |
34 | def content_type(type) |
35 | @request.env['Content-Type'] = type |
36 | end |
37 | |
38 | def accept(accept) |
39 | @request.env["HTTP_ACCEPT"] = accept |
40 | end |
41 | |
42 | def assert_models_equal(expected_models, actual_models, message = nil) |
43 | to_test_param = lambda { |r| "<#{r.class}:#{r.to_param}>" } |
44 | full_message = build_message(message, "<?> expected but was\n<?>.\n", |
45 | expected_models.collect(&to_test_param), actual_models.collect(&to_test_param)) |
46 | assert_block(full_message) { expected_models == actual_models } |
47 | end |
48 | end |