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:
- 3564 Bytes
1 | require File.dirname(__FILE__) + "/extension_generators_spec_helper" |
2 | |
3 | describe "ExtensionControllerGenerator 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_controller'), File.join(RADIANT_ROOT, 'vendor/generators') |
9 | run_generator('extension_controller', %w(example Events show new index)) |
10 | end |
11 | |
12 | it 'should generate the controller file in the correct location' do |
13 | 'vendor/extensions/example'.should have_generated_controller_for('Events') do |body| |
14 | %w(show new index).each do |name| |
15 | body.should have_method(name) |
16 | end |
17 | end |
18 | end |
19 | |
20 | it 'should generate the controller spec file in the correct location' do |
21 | 'vendor/extensions/example'.should have_generated_controller_spec_for('Events') |
22 | end |
23 | |
24 | it 'should generate the helper file in the correct location' do |
25 | 'vendor/extensions/example'.should have_generated_helper_for('Events') |
26 | end |
27 | |
28 | it 'should generate the helper spec file in the correct location' do |
29 | 'vendor/extensions/example'.should have_generated_helper_spec_for('Events') |
30 | end |
31 | |
32 | it 'should generate the view files in the correct location' do |
33 | %w(show new index).each do |action| |
34 | 'vendor/extensions/example'.should have_generated_view_for('Events', action) |
35 | end |
36 | end |
37 | |
38 | it 'should generate the view spec files in the correct location' do |
39 | %w(show new index).each do |action| |
40 | 'vendor/extensions/example'.should have_generated_view_spec_for('Events', action) |
41 | end |
42 | end |
43 | |
44 | after(:each) do |
45 | extension_dir = File.join(RADIANT_ROOT, 'vendor/extensions/example') |
46 | rm_rf Dir["#{extension_dir}/app/controllers/*"] |
47 | rm_rf Dir["#{extension_dir}/app/helpers/*"] |
48 | rm_rf Dir["#{extension_dir}/app/views/*"] |
49 | rm_rf Dir["#{extension_dir}/spec/controllers/*"] |
50 | rm_rf Dir["#{extension_dir}/spec/helpers/*"] |
51 | rm_rf Dir["#{extension_dir}/spec/views/*"] |
52 | rm_rf Dir["#{RADIANT_ROOT}/vendor/generators/*"] |
53 | end |
54 | end |
55 | |
56 | describe "ExtensionControllerGenerator with test unit" do |
57 | it_should_behave_like AllGenerators |
58 | it_should_behave_like AllExtensionGenerators |
59 | |
60 | before(:each) do |
61 | cp_r File.join(BASE_ROOT, 'lib/generators/extension_controller'), File.join(RADIANT_ROOT, 'vendor/generators') |
62 | run_generator('extension_controller', %w(example Events show new index --with-test-unit)) |
63 | end |
64 | |
65 | it 'should generate the controller file in the correct location' do |
66 | 'vendor/extensions/example'.should have_generated_controller_for('Events') do |body| |
67 | %w(show new index).each do |name| |
68 | body.should have_method(name) |
69 | end |
70 | end |
71 | end |
72 | |
73 | it 'should generate the controller spec file in the correct location' do |
74 | 'vendor/extensions/example'.should have_generated_functional_test_for('Events') |
75 | end |
76 | |
77 | it 'should generate the helper file in the correct location' do |
78 | 'vendor/extensions/example'.should have_generated_helper_for('Events') |
79 | end |
80 | |
81 | it 'should generate the view files in the correct location' do |
82 | %w(show new index).each do |action| |
83 | 'vendor/extensions/example'.should have_generated_view_for('Events', action) |
84 | end |
85 | end |
86 | |
87 | after(:each) do |
88 | extension_dir = File.join(RADIANT_ROOT, 'vendor/extensions/example') |
89 | rm_rf Dir["#{extension_dir}/app/controllers/*"] |
90 | rm_rf Dir["#{extension_dir}/app/helpers/*"] |
91 | rm_rf Dir["#{extension_dir}/app/views/*"] |
92 | rm_rf Dir["#{extension_dir}/test/*"] |
93 | rm_rf Dir["#{RADIANT_ROOT}/vendor/generators/*"] |
94 | end |
95 | end |