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:
- 2270 Bytes
1 | require File.dirname(__FILE__) + "/extension_generators_spec_helper" |
2 | |
3 | describe "ExtensionModelGenerator with normal options" do |
4 | it_should_behave_like AllGenerators |
5 | it_should_behave_like AllExtensionGenerators |
6 | |
7 | before(:each) do |
8 | cp_r File.join(BASE_ROOT, 'lib/generators/extension_model'), File.join(RADIANT_ROOT, 'vendor/generators') |
9 | run_generator('extension_model', %w(example Event)) |
10 | end |
11 | |
12 | it 'should generate the migration file in the correct location' do |
13 | 'vendor/extensions/example'.should have_generated_migration('CreateEvents') |
14 | end |
15 | |
16 | it 'should generate the model file in the correct location' do |
17 | 'vendor/extensions/example'.should have_generated_model_for('Event') |
18 | end |
19 | |
20 | it 'should generate the model spec file in the correct location' do |
21 | 'vendor/extensions/example'.should have_generated_model_spec_for('Event') |
22 | end |
23 | |
24 | after(:each) do |
25 | extension_dir = File.join(RADIANT_ROOT, 'vendor/extensions/example') |
26 | rm_rf Dir["#{extension_dir}/db/migrate/*"] |
27 | rm_rf Dir["#{extension_dir}/app/models/*"] |
28 | rm_rf Dir["#{extension_dir}/spec/models/*"] |
29 | rm_rf Dir["#{RADIANT_ROOT}/vendor/generators/*"] |
30 | end |
31 | end |
32 | |
33 | describe "ExtensionModelGenerator with test unit" do |
34 | it_should_behave_like AllGenerators |
35 | it_should_behave_like AllExtensionGenerators |
36 | |
37 | before(:each) do |
38 | cp_r File.join(BASE_ROOT, 'lib/generators/extension_model'), File.join(RADIANT_ROOT, 'vendor/generators') |
39 | run_generator('extension_model', %w(example Event --with-test-unit)) |
40 | end |
41 | |
42 | it 'should generate the migration file in the correct location' do |
43 | 'vendor/extensions/example'.should have_generated_migration('CreateEvents') |
44 | end |
45 | |
46 | it 'should generate the model file in the correct location' do |
47 | 'vendor/extensions/example'.should have_generated_model_for('Event') |
48 | end |
49 | |
50 | it 'should generate the unit test file in the correct location' do |
51 | 'vendor/extensions/example'.should have_generated_unit_test_for('Event') |
52 | end |
53 | |
54 | after(:each) do |
55 | extension_dir = File.join(RADIANT_ROOT, 'vendor/extensions/example') |
56 | rm_rf Dir["#{extension_dir}/db/migrate/*"] |
57 | rm_rf Dir["#{extension_dir}/app/models/*"] |
58 | rm_rf Dir["#{extension_dir}/test/*"] |
59 | rm_rf Dir["#{RADIANT_ROOT}/vendor/generators/*"] |
60 | end |
61 | end |