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:
- 1980 Bytes
1 | unless defined? SPEC_ROOT |
2 | ENV["RAILS_ENV"] = "test" |
3 | |
4 | SPEC_ROOT = File.expand_path(File.dirname(__FILE__)) |
5 | |
6 | unless defined? RADIANT_ROOT |
7 | if env_file = ENV["RADIANT_ENV_FILE"] |
8 | require env_file |
9 | else |
10 | require File.expand_path(SPEC_ROOT + "/../config/environment") |
11 | end |
12 | end |
13 | require 'spec' |
14 | require 'spec/rails' |
15 | require 'dataset' |
16 | |
17 | module Kernel |
18 | def rputs(*args) |
19 | puts *["<pre>", args.collect {|a| CGI.escapeHTML(a.inspect)}, "</pre>"] |
20 | end |
21 | end |
22 | |
23 | class ActiveSupport::TestCase |
24 | include Dataset |
25 | datasets_directory "#{RADIANT_ROOT}/spec/datasets" |
26 | Dataset::ContextClassMethods.datasets_database_dump_path = File.expand_path(RAILS_ROOT + '/tmp/dataset') |
27 | |
28 | class << self |
29 | # Class method for test helpers |
30 | def test_helper(*names) |
31 | names.each do |name| |
32 | name = name.to_s |
33 | name = $1 if name =~ /^(.*?)_test_helper$/i |
34 | name = name.singularize |
35 | first_time = true |
36 | begin |
37 | constant = (name.camelize + 'TestHelper').constantize |
38 | self.class_eval { include constant } |
39 | rescue NameError |
40 | filename = File.expand_path(SPEC_ROOT + '/../test/helpers/' + name + '_test_helper.rb') |
41 | require filename if first_time |
42 | first_time = false |
43 | retry |
44 | end |
45 | end |
46 | end |
47 | alias :test_helpers :test_helper |
48 | end |
49 | end |
50 | |
51 | Dir[RADIANT_ROOT + '/spec/matchers/*_matcher.rb'].each do |matcher| |
52 | require matcher |
53 | end |
54 | |
55 | module Spec |
56 | module Application |
57 | module ExampleExtensions |
58 | def rails_log |
59 | log = IO.read(RAILS_ROOT + '/log/test.log') |
60 | log.should_not be_nil |
61 | log |
62 | end |
63 | end |
64 | end |
65 | end |
66 | |
67 | Spec::Runner.configure do |config| |
68 | config.include Spec::Application::ExampleExtensions |
69 | |
70 | config.use_transactional_fixtures = true |
71 | config.use_instantiated_fixtures = false |
72 | config.fixture_path = RAILS_ROOT + '/spec/fixtures/' |
73 | end |
74 | end |