Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 802 Bytes
1 | module UserTestHelper |
2 | VALID_USER_PARAMS = { |
3 | :name => 'John Doe', |
4 | :login => 'jdoe', |
5 | :password => 'coolness', |
6 | :password_confirmation => 'coolness', |
7 | :email => 'jdoe@gmail.com' |
8 | } |
9 | |
10 | def user_params(options = {}) |
11 | params = VALID_USER_PARAMS.dup |
12 | params.merge!(:login => @user_login) if @user_login |
13 | params.merge!(options) |
14 | end |
15 | |
16 | def destroy_test_user(login = @user_login) |
17 | while user = get_test_user(login) do |
18 | user.destroy |
19 | end |
20 | end |
21 | |
22 | def get_test_user(login = @user_login) |
23 | User.find_by_login(login) |
24 | end |
25 | |
26 | def create_test_user(options = {}) |
27 | options[:login] ||= @user_login if @user_login |
28 | user = User.new user_params(options) |
29 | if user.save |
30 | user |
31 | else |
32 | raise "user <#{user.inspect}> could not be saved" |
33 | end |
34 | end |
35 | end |