generator-spec 0.5.0 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. data/.document +0 -0
  2. data/.gitignore +0 -0
  3. data/.rspec +0 -0
  4. data/LICENSE +0 -0
  5. data/README.markdown +19 -13
  6. data/Rakefile +14 -35
  7. data/VERSION +1 -1
  8. data/generator-spec.gemspec +63 -148
  9. data/lib/generator-spec.rb +12 -0
  10. data/lib/generator-spec/namespaces.rb +7 -0
  11. data/lib/{generator_spec/helpers/configure_rails.rb → generator-spec/rails/configure.rb} +3 -3
  12. data/lib/generator-spec/rspec.rb +1 -0
  13. data/lib/generator-spec/rspec/configure.rb +6 -0
  14. data/lib/{generator_spec/rspec_generator/generator_util.rb → generator-spec/rspec/generator.rb} +6 -6
  15. data/lib/{generator_spec/rspec_generator → generator-spec/rspec/generator}/configure.rb +0 -0
  16. data/lib/{generator_spec/require_generator.rb → generator-spec/rspec/generator/require.rb} +0 -0
  17. data/lib/{generator_spec/rspec_generator → generator-spec/rspec/generator}/routes.rb +0 -0
  18. data/lib/{generator_spec/rspec_generator → generator-spec/rspec/generator}/test_case.rb +0 -0
  19. data/lib/generator-spec/rspec/macro.rb +18 -0
  20. data/lib/generator-spec/rspec/matchers/generate_artifact.rb +34 -0
  21. data/lib/generator-spec/rspec/matchers/generate_artifacts.rb +33 -0
  22. data/lib/generators/controller/controller_generator.rb +15 -21
  23. data/lib/generators/helper/helper_generator.rb +13 -29
  24. data/lib/generators/migration/migration_generator.rb +6 -7
  25. data/lib/generators/migration/templates/create_users.erb +0 -0
  26. data/lib/generators/model/model_generator.rb +36 -55
  27. data/lib/generators/observer/observer_generator.rb +2 -0
  28. data/lib/generators/view/view_generator.rb +2 -0
  29. data/spec/generator_spec/generators/controller_gen_spec.rb +40 -0
  30. data/spec/generator_spec/generators/{helper_generator_spec.rb → helper_gen_spec.rb} +4 -8
  31. data/spec/generator_spec/generators/{migration_generator_spec.rb → migration_gen_spec.rb} +3 -8
  32. data/spec/generator_spec/generators/model_gen_spec.rb +36 -0
  33. data/spec/generator_spec/generators/{observer_generator_spec.rb → observer_gen_spec.rb} +12 -21
  34. data/spec/generator_spec/generators/{view_generator_spec.rb → view_gen_spec.rb} +9 -20
  35. data/spec/generator_spec/matchers/generate_artifact_spec.rb +36 -0
  36. data/spec/generator_spec/matchers/generate_artifacts_spec.rb +35 -0
  37. data/spec/spec_helper.rb +5 -6
  38. data/wiki/Custom Rails 3 Generators.textile b/data/wiki/Custom Rails 3 → Generators.textile +0 -0
  39. data/wiki/content_matchers.textile +0 -0
  40. data/wiki/file_matchers.textile +0 -0
  41. data/wiki/migration_matchers.textile +0 -0
  42. data/wiki/rails_helpers.textile +0 -0
  43. metadata +117 -154
  44. data/lib/generator_spec.rb +0 -12
  45. data/lib/generator_spec/extensions/core_ext.rb +0 -47
  46. data/lib/generator_spec/helpers/generator_helper.rb +0 -11
  47. data/lib/generator_spec/helpers/migration_helper.rb +0 -69
  48. data/lib/generator_spec/main.rb +0 -77
  49. data/lib/generator_spec/matchers/content/content_matcher.rb +0 -110
  50. data/lib/generator_spec/matchers/content/have_block.rb +0 -57
  51. data/lib/generator_spec/matchers/content/have_call.rb +0 -59
  52. data/lib/generator_spec/matchers/content/have_calls.rb +0 -60
  53. data/lib/generator_spec/matchers/content/have_class_self.rb +0 -40
  54. data/lib/generator_spec/matchers/content/have_comment.rb +0 -42
  55. data/lib/generator_spec/matchers/content/have_method.rb +0 -66
  56. data/lib/generator_spec/matchers/content/have_module.rb +0 -66
  57. data/lib/generator_spec/matchers/content/have_region.rb +0 -48
  58. data/lib/generator_spec/matchers/content/have_subclass.rb +0 -50
  59. data/lib/generator_spec/matchers/content/include_module.rb +0 -51
  60. data/lib/generator_spec/matchers/content/inherit_from.rb +0 -40
  61. data/lib/generator_spec/matchers/file/generate_directory.rb +0 -73
  62. data/lib/generator_spec/matchers/file/generate_file.rb +0 -103
  63. data/lib/generator_spec/matchers/file/generate_migration.rb +0 -54
  64. data/lib/generator_spec/matchers/file/have_file.rb +0 -115
  65. data/lib/generator_spec/matchers/helpers/content.rb +0 -18
  66. data/lib/generator_spec/matchers/helpers/file.rb +0 -26
  67. data/lib/generator_spec/matchers/helpers/migration.rb +0 -89
  68. data/lib/generator_spec/matchers/migration/have_column.rb +0 -29
  69. data/lib/generator_spec/matchers/migration/have_index.rb +0 -9
  70. data/lib/generator_spec/matchers/migration/have_table.rb +0 -18
  71. data/lib/generator_spec/matchers/migration/have_tbl_column.rb +0 -25
  72. data/lib/generator_spec/matchers/migration/have_up_down.rb +0 -15
  73. data/lib/generator_spec/rails_helpers/base_helper.rb +0 -171
  74. data/lib/generator_spec/rails_helpers/rails_app.rb +0 -166
  75. data/lib/generator_spec/rails_helpers/rails_controller.rb +0 -44
  76. data/lib/generator_spec/rails_helpers/rails_helper.rb +0 -40
  77. data/lib/generator_spec/rails_helpers/rails_mailer.rb +0 -39
  78. data/lib/generator_spec/rails_helpers/rails_migration.rb +0 -51
  79. data/lib/generator_spec/rails_helpers/rails_model.rb +0 -40
  80. data/lib/generator_spec/rails_helpers/rails_observer.rb +0 -39
  81. data/lib/generator_spec/rails_helpers/rails_orm.rb +0 -114
  82. data/lib/generator_spec/rails_helpers/rails_view.rb +0 -65
  83. data/rspec_for_generators.gemspec +0 -96
  84. data/spec/generator_spec/generators/controller_generator_spec.rb +0 -47
  85. data/spec/generator_spec/generators/model_generator_spec.rb +0 -41
  86. data/spec/generator_spec/matchers/content/class_self_spec.rb +0 -30
  87. data/spec/generator_spec/matchers/content/have_block_spec.rb +0 -57
  88. data/spec/generator_spec/matchers/content/have_call_spec.rb +0 -55
  89. data/spec/generator_spec/matchers/content/have_calls_spec.rb +0 -47
  90. data/spec/generator_spec/matchers/content/have_class_spec.rb +0 -34
  91. data/spec/generator_spec/matchers/content/have_method_spec.rb +0 -52
  92. data/spec/generator_spec/matchers/content/have_module_spec.rb +0 -34
  93. data/spec/generator_spec/matchers/content/have_region_spec.rb +0 -56
  94. data/spec/generator_spec/matchers/content/have_subclass_spec.rb +0 -34
  95. data/spec/generator_spec/matchers/content/include_module_spec.rb +0 -36
  96. data/spec/generator_spec/matchers/content/inherit_from_spec.rb +0 -34
  97. data/spec/generator_spec/matchers/file/directory_spec.rb +0 -0
  98. data/spec/generator_spec/matchers/file/file_spec.rb +0 -0
  99. data/spec/generator_spec/matchers/file/migration_spec.rb +0 -0
  100. data/spec/generator_spec/matchers/migration/have_column_spec.rb +0 -0
  101. data/spec/generator_spec/matchers/migration/have_index_spec.rb +0 -0
  102. data/spec/generator_spec/matchers/migration/have_table_spec.rb +0 -0
  103. data/spec/generator_spec/matchers/migration/have_tbl_column_spec.rb +0 -0
  104. data/spec/generator_spec/matchers/migration/have_up_down_spec.rb +0 -0
  105. data/spec/generator_spec/matchers/rails/controller_matcher_spec.rb +0 -27
  106. data/spec/generator_spec/matchers/rails/helper_matcher_spec.rb +0 -26
  107. data/spec/generator_spec/matchers/rails/mailer_matcher_spec.rb +0 -24
  108. data/spec/generator_spec/matchers/rails/model_matcher_spec.rb +0 -31
  109. data/spec/generator_spec/matchers/rails/observer_matcher_spec.rb +0 -19
  110. data/spec/generator_spec/matchers/rails/view_matcher_spec.rb +0 -23
  111. data/spec/generator_spec/rails_helpers/rails_app_spec.rb +0 -0
  112. data/spec/generator_spec/rails_helpers/rails_controller_spec.rb +0 -33
  113. data/spec/generator_spec/rails_helpers/rails_helper_spec.rb +0 -33
  114. data/spec/generator_spec/rails_helpers/rails_mailer_spec.rb +0 -33
  115. data/spec/generator_spec/rails_helpers/rails_migration_spec.rb +0 -0
  116. data/spec/generator_spec/rails_helpers/rails_model_spec.rb +0 -31
  117. data/spec/generator_spec/rails_helpers/rails_observer_spec.rb +0 -33
  118. data/spec/generator_spec/rails_helpers/rails_orm_spec.rb +0 -0
  119. data/spec/generator_spec/rails_helpers/rails_view_spec.rb +0 -31
@@ -1,16 +1,12 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  RSpec::Generator.debug = true
4
4
 
5
5
  require_generators :all
6
6
 
7
- module RSpec::Core
8
- class ExampleGroup
9
- include RSpec::Rails::Helper
10
- end
11
- end
12
-
13
7
  describe 'helper_generator' do
8
+ use_helper :helper
9
+
14
10
  before :each do
15
11
  setup_generator 'helper_generator' do
16
12
  tests HelperGenerator
@@ -34,7 +30,7 @@ describe 'helper_generator' do
34
30
  create_helper :account do
35
31
  '# helper content'
36
32
  end
37
- g.run_generator [:account].args
33
+ g.run_generator :account.args
38
34
  g.should generate_helper :account do |content|
39
35
  content.should have_helper_class :account do |klass|
40
36
  klass.should have_method :help_me
@@ -1,15 +1,10 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
1
+ require 'spec_helper'
2
+ require 'migration-spec'
2
3
 
3
4
  RSpec::Generator.debug = true
4
5
 
5
6
  require_generator :migration
6
7
 
7
- class Class
8
- def spec
9
- RSpec::DSL
10
- end
11
- end
12
-
13
8
  describe 'migration_generator' do
14
9
  use_orm :active_record
15
10
  helpers :migration, :helper
@@ -26,7 +21,7 @@ describe 'migration_generator' do
26
21
 
27
22
  it "should generate create_user migration" do
28
23
  with_generator do |g|
29
- g.run_generator [:create_users].args
24
+ g.run_generator :create_users.args
30
25
  g.should generate_migration :create_users do |content|
31
26
  content.should have_migration :create_users do |klass|
32
27
  klass.should have_up do |up|
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+ require_generator :model
3
+
4
+ describe 'model_generator' do
5
+ use_orm :mongoid
6
+ # use_helper :model
7
+
8
+ before :each do
9
+ setup_generator 'model_generator' do
10
+ tests ModelGenerator
11
+ end
12
+ remove_model :account
13
+ end
14
+
15
+ after :each do
16
+ remove_model :account
17
+ end
18
+
19
+ it "should not work without an Account model file" do
20
+ with_generator do |g|
21
+ g.run_generator :account.args
22
+ g.should_not generate_model :account
23
+ end
24
+ end
25
+
26
+ it "should decorate an existing Account model file with include Canable:Ables" do
27
+ with_generator do |g|
28
+ create_model :account
29
+ g.run_generator :account.args
30
+ g.should generate_model :account do |content|
31
+ puts content
32
+ content.should include_module 'Canable::Ables'
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,47 +1,38 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
1
+ require 'spec_helper'
2
2
  require_generator :observer
3
3
 
4
- module RSpec::Core
5
- class ExampleGroup
6
- include RSpec::Rails::Observer
7
- end
8
- end
9
-
10
- describe 'observer_generator' do
4
+ describe 'observer_generator' do
5
+ use_helper :observer
6
+
11
7
  before :each do
12
8
  setup_generator 'observer_generator' do
13
9
  tests ObserverGenerator
14
10
  end
15
- remove_observer 'account'
11
+ remove_observer :account
16
12
  end
17
13
 
18
14
  after :each do
19
- remove_observer 'account'
15
+ remove_observer :account
20
16
  end
21
17
 
22
18
  it "should not work without an Account observer file" do
23
19
  with_generator do |g|
24
- name = 'account'
25
- g.run_generator [name]
26
- g.should_not generate_observer name
20
+ g.run_generator :account.args
21
+ g.should_not generate_observer :account
27
22
  end
28
23
  end
29
24
 
30
25
  it "should decorate an existing Account observer file with a 'observe_me' method" do
31
26
  with_generator do |g|
32
- name = 'account'
33
- create_observer name do
27
+ create_observer :account do
34
28
  '# observer content'
35
29
  end
36
- g.run_generator [name]
37
- g.should generate_observer name do |content|
38
- content.should have_observer_class name do |klass|
30
+ g.run_generator :account.args
31
+ g.should generate_observer :account do |content|
32
+ content.should have_observer_class :account do |klass|
39
33
  klass.should have_method :observe_me
40
34
  end
41
35
  end
42
36
  end
43
37
  end
44
38
  end
45
-
46
-
47
-
@@ -1,45 +1,34 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
1
+ require 'spec_helper'
2
2
  require_generator :view
3
3
 
4
- module RSpec::Core
5
- class ExampleGroup
6
- include RSpec::Rails::View
7
- end
8
- end
9
-
10
4
  describe 'view_generator' do
5
+ use_helper :view
6
+
11
7
  before :each do
12
8
  setup_generator 'view_generator' do
13
9
  tests ViewGenerator
14
10
  end
15
- remove_view :account, :edit, 'html.erb'
11
+ remove_view :account, :edit
16
12
  end
17
13
 
18
14
  after :each do
19
- remove_view :account, :edit, 'html.erb'
15
+ remove_view :account, :edit
20
16
  end
21
17
 
22
18
  it "should not work without an Edit Account view file" do
23
19
  with_generator do |g|
24
- name = :account
25
- action = :edit
26
- type = 'html.erb'
27
- g.run_generator [name, action, type].map(&:to_s)
20
+ g.run_generator [:account, :edit, 'html.erb'].args
28
21
  g.should_not generate_view name, action, type
29
22
  end
30
23
  end
31
24
 
32
25
  it "should decorate an existing Edit Account view file with some view code" do
33
26
  with_generator do |g|
34
- name = :account
35
- action = :edit
36
- type = 'html.erb'
37
-
38
- create_view name, action, type do
27
+ create_view :account, :edit do
39
28
  '# view content'
40
29
  end
41
- g.run_generator [name, action, type].map(&:to_s)
42
- g.should generate_view name, action, type do |file|
30
+ g.run_generator [:account, :edit, 'html.erb'].args
31
+ g.should generate_view :account, :edit do |file|
43
32
  file.should match /Hello You/
44
33
  end
45
34
  end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+ require_generator :model
3
+
4
+ describe 'model_generator' do
5
+ use_orm :mongoid
6
+
7
+ before :each do
8
+ setup_generator 'model_generator' do
9
+ tests ModelGenerator
10
+ end
11
+ remove_model :account
12
+ end
13
+
14
+ after :each do
15
+ # remove_model :account
16
+ end
17
+
18
+ it "should not work without an Account model file" do
19
+ with_generator do |g|
20
+ g.run_generator :account.args
21
+ g.should_not generate_model :account
22
+ end
23
+ end
24
+
25
+ it "should decorate an existing Account model file with include Canable:Ables" do
26
+ with_generator do |g|
27
+ create_model :account
28
+ g.run_generator :account.args
29
+ g.should generate_artifact :account, :model
30
+ g.should generate_model :account do |content|
31
+ puts content
32
+ content.should include_module 'Canable::Ables'
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require_generator :model
3
+
4
+ describe 'model_generator' do
5
+ use_orm :mongoid
6
+
7
+ before :each do
8
+ setup_generator 'model_generator' do
9
+ tests ModelGenerator
10
+ end
11
+ remove_models :account, :person
12
+ end
13
+
14
+ after :each do
15
+ remove_models :account, :person
16
+ end
17
+
18
+ it "should not work without an Account model file" do
19
+ with_generator do |g|
20
+ g.run_generator :account.args
21
+ g.should_not generate_models :account, :person
22
+ end
23
+ end
24
+
25
+ it "should decorate an existing Account model file with include Canable:Ables" do
26
+ with_generator do |g|
27
+ create_model :account
28
+ create_model :person
29
+ g.run_generator :account.args
30
+ g.run_generator :person.args
31
+ g.should generate_artifacts :model, :account, :person
32
+ g.should generate_models :account, :person
33
+ end
34
+ end
35
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,12 +1,11 @@
1
- require 'rspec'
2
- require 'rspec/autorun'
3
- require 'generator_spec'
1
+ require 'rspec/core'
2
+ require 'generator-spec'
4
3
 
5
4
  RSpec::Generator.configure do |config|
6
- config.debug = false
7
- config.remove_temp_dir = true
5
+ config.debug = true
6
+ config.remove_temp_dir = true #false
8
7
  config.default_rails_root(__FILE__)
9
8
  config.lib = File.dirname(__FILE__) + '/../lib'
10
- # config.logger = :file # :stdout
9
+ config.logger = :stdout # :file
11
10
  end
12
11
 
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 0
9
- version: 0.5.0
7
+ - 6
8
+ - 3
9
+ version: 0.6.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-14 00:00:00 +02:00
17
+ date: 2010-09-16 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -23,40 +23,71 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  segments:
29
29
  - 2
30
30
  - 0
31
31
  - 0
32
- - beta19
33
- version: 2.0.0.beta19
32
+ - beta
33
+ - 22
34
+ version: 2.0.0.beta.22
34
35
  type: :development
35
36
  version_requirements: *id001
36
37
  - !ruby/object:Gem::Dependency
37
- name: rspec
38
+ name: mocha
38
39
  prerelease: false
39
40
  requirement: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
42
- - - ">="
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ segments:
46
+ - 0
47
+ - 9
48
+ - 8
49
+ version: 0.9.8
50
+ type: :development
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rails-app-spec
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ segments:
61
+ - 0
62
+ - 2
63
+ - 5
64
+ version: 0.2.5
65
+ type: :development
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
68
+ name: rspec
69
+ prerelease: false
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ~>
43
74
  - !ruby/object:Gem::Version
44
75
  segments:
45
76
  - 2
46
77
  - 0
47
78
  - 0
48
79
  - beta
49
- - 19
50
- version: 2.0.0.beta.19
80
+ - 22
81
+ version: 2.0.0.beta.22
51
82
  type: :runtime
52
- version_requirements: *id002
83
+ version_requirements: *id004
53
84
  - !ruby/object:Gem::Dependency
54
85
  name: rake
55
86
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
87
+ requirement: &id005 !ruby/object:Gem::Requirement
57
88
  none: false
58
89
  requirements:
59
- - - ">="
90
+ - - ~>
60
91
  - !ruby/object:Gem::Version
61
92
  segments:
62
93
  - 0
@@ -64,30 +95,29 @@ dependencies:
64
95
  - 7
65
96
  version: 0.8.7
66
97
  type: :runtime
67
- version_requirements: *id003
98
+ version_requirements: *id005
68
99
  - !ruby/object:Gem::Dependency
69
100
  name: rails
70
101
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
102
+ requirement: &id006 !ruby/object:Gem::Requirement
72
103
  none: false
73
104
  requirements:
74
- - - ">="
105
+ - - ~>
75
106
  - !ruby/object:Gem::Version
76
107
  segments:
77
108
  - 3
78
109
  - 0
79
110
  - 0
80
- - rc
81
- version: 3.0.0.rc
111
+ version: 3.0.0
82
112
  type: :runtime
83
- version_requirements: *id004
113
+ version_requirements: *id006
84
114
  - !ruby/object:Gem::Dependency
85
115
  name: test-unit
86
116
  prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
117
+ requirement: &id007 !ruby/object:Gem::Requirement
88
118
  none: false
89
119
  requirements:
90
- - - ">="
120
+ - - ~>
91
121
  - !ruby/object:Gem::Version
92
122
  segments:
93
123
  - 2
@@ -95,14 +125,14 @@ dependencies:
95
125
  - 9
96
126
  version: 2.0.9
97
127
  type: :runtime
98
- version_requirements: *id005
128
+ version_requirements: *id007
99
129
  - !ruby/object:Gem::Dependency
100
130
  name: require_all
101
131
  prerelease: false
102
- requirement: &id006 !ruby/object:Gem::Requirement
132
+ requirement: &id008 !ruby/object:Gem::Requirement
103
133
  none: false
104
134
  requirements:
105
- - - ">="
135
+ - - ~>
106
136
  - !ruby/object:Gem::Version
107
137
  segments:
108
138
  - 1
@@ -110,8 +140,38 @@ dependencies:
110
140
  - 0
111
141
  version: 1.1.0
112
142
  type: :runtime
113
- version_requirements: *id006
114
- description: RSpec 2 library to assist in writing generator specs
143
+ version_requirements: *id008
144
+ - !ruby/object:Gem::Dependency
145
+ name: sugar-high
146
+ prerelease: false
147
+ requirement: &id009 !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ segments:
153
+ - 0
154
+ - 2
155
+ - 5
156
+ version: 0.2.5
157
+ type: :runtime
158
+ version_requirements: *id009
159
+ - !ruby/object:Gem::Dependency
160
+ name: rails3_artifactor
161
+ prerelease: false
162
+ requirement: &id010 !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ~>
166
+ - !ruby/object:Gem::Version
167
+ segments:
168
+ - 0
169
+ - 2
170
+ - 0
171
+ version: 0.2.0
172
+ type: :runtime
173
+ version_requirements: *id010
174
+ description: RSpec 2 library to facilitate creating generator specs
115
175
  email: kmandrup@gmail.com
116
176
  executables: []
117
177
 
@@ -129,51 +189,19 @@ files:
129
189
  - Rakefile
130
190
  - VERSION
131
191
  - generator-spec.gemspec
132
- - lib/generator_spec.rb
133
- - lib/generator_spec/extensions/core_ext.rb
134
- - lib/generator_spec/helpers/configure_rails.rb
135
- - lib/generator_spec/helpers/generator_helper.rb
136
- - lib/generator_spec/helpers/migration_helper.rb
137
- - lib/generator_spec/main.rb
138
- - lib/generator_spec/matchers/content/content_matcher.rb
139
- - lib/generator_spec/matchers/content/have_block.rb
140
- - lib/generator_spec/matchers/content/have_call.rb
141
- - lib/generator_spec/matchers/content/have_calls.rb
142
- - lib/generator_spec/matchers/content/have_class_self.rb
143
- - lib/generator_spec/matchers/content/have_comment.rb
144
- - lib/generator_spec/matchers/content/have_method.rb
145
- - lib/generator_spec/matchers/content/have_module.rb
146
- - lib/generator_spec/matchers/content/have_region.rb
147
- - lib/generator_spec/matchers/content/have_subclass.rb
148
- - lib/generator_spec/matchers/content/include_module.rb
149
- - lib/generator_spec/matchers/content/inherit_from.rb
150
- - lib/generator_spec/matchers/file/generate_directory.rb
151
- - lib/generator_spec/matchers/file/generate_file.rb
152
- - lib/generator_spec/matchers/file/generate_migration.rb
153
- - lib/generator_spec/matchers/file/have_file.rb
154
- - lib/generator_spec/matchers/helpers/content.rb
155
- - lib/generator_spec/matchers/helpers/file.rb
156
- - lib/generator_spec/matchers/helpers/migration.rb
157
- - lib/generator_spec/matchers/migration/have_column.rb
158
- - lib/generator_spec/matchers/migration/have_index.rb
159
- - lib/generator_spec/matchers/migration/have_table.rb
160
- - lib/generator_spec/matchers/migration/have_tbl_column.rb
161
- - lib/generator_spec/matchers/migration/have_up_down.rb
162
- - lib/generator_spec/rails_helpers/base_helper.rb
163
- - lib/generator_spec/rails_helpers/rails_app.rb
164
- - lib/generator_spec/rails_helpers/rails_controller.rb
165
- - lib/generator_spec/rails_helpers/rails_helper.rb
166
- - lib/generator_spec/rails_helpers/rails_mailer.rb
167
- - lib/generator_spec/rails_helpers/rails_migration.rb
168
- - lib/generator_spec/rails_helpers/rails_model.rb
169
- - lib/generator_spec/rails_helpers/rails_observer.rb
170
- - lib/generator_spec/rails_helpers/rails_orm.rb
171
- - lib/generator_spec/rails_helpers/rails_view.rb
172
- - lib/generator_spec/require_generator.rb
173
- - lib/generator_spec/rspec_generator/configure.rb
174
- - lib/generator_spec/rspec_generator/generator_util.rb
175
- - lib/generator_spec/rspec_generator/routes.rb
176
- - lib/generator_spec/rspec_generator/test_case.rb
192
+ - lib/generator-spec.rb
193
+ - lib/generator-spec/namespaces.rb
194
+ - lib/generator-spec/rails/configure.rb
195
+ - lib/generator-spec/rspec.rb
196
+ - lib/generator-spec/rspec/configure.rb
197
+ - lib/generator-spec/rspec/generator.rb
198
+ - lib/generator-spec/rspec/generator/configure.rb
199
+ - lib/generator-spec/rspec/generator/require.rb
200
+ - lib/generator-spec/rspec/generator/routes.rb
201
+ - lib/generator-spec/rspec/generator/test_case.rb
202
+ - lib/generator-spec/rspec/macro.rb
203
+ - lib/generator-spec/rspec/matchers/generate_artifact.rb
204
+ - lib/generator-spec/rspec/matchers/generate_artifacts.rb
177
205
  - lib/generators/controller/controller_generator.rb
178
206
  - lib/generators/helper/helper_generator.rb
179
207
  - lib/generators/migration/migration_generator.rb
@@ -181,47 +209,14 @@ files:
181
209
  - lib/generators/model/model_generator.rb
182
210
  - lib/generators/observer/observer_generator.rb
183
211
  - lib/generators/view/view_generator.rb
184
- - rspec_for_generators.gemspec
185
- - spec/generator_spec/generators/controller_generator_spec.rb
186
- - spec/generator_spec/generators/helper_generator_spec.rb
187
- - spec/generator_spec/generators/migration_generator_spec.rb
188
- - spec/generator_spec/generators/model_generator_spec.rb
189
- - spec/generator_spec/generators/observer_generator_spec.rb
190
- - spec/generator_spec/generators/view_generator_spec.rb
191
- - spec/generator_spec/matchers/content/class_self_spec.rb
192
- - spec/generator_spec/matchers/content/have_block_spec.rb
193
- - spec/generator_spec/matchers/content/have_call_spec.rb
194
- - spec/generator_spec/matchers/content/have_calls_spec.rb
195
- - spec/generator_spec/matchers/content/have_class_spec.rb
196
- - spec/generator_spec/matchers/content/have_method_spec.rb
197
- - spec/generator_spec/matchers/content/have_module_spec.rb
198
- - spec/generator_spec/matchers/content/have_region_spec.rb
199
- - spec/generator_spec/matchers/content/have_subclass_spec.rb
200
- - spec/generator_spec/matchers/content/include_module_spec.rb
201
- - spec/generator_spec/matchers/content/inherit_from_spec.rb
202
- - spec/generator_spec/matchers/file/directory_spec.rb
203
- - spec/generator_spec/matchers/file/file_spec.rb
204
- - spec/generator_spec/matchers/file/migration_spec.rb
205
- - spec/generator_spec/matchers/migration/have_column_spec.rb
206
- - spec/generator_spec/matchers/migration/have_index_spec.rb
207
- - spec/generator_spec/matchers/migration/have_table_spec.rb
208
- - spec/generator_spec/matchers/migration/have_tbl_column_spec.rb
209
- - spec/generator_spec/matchers/migration/have_up_down_spec.rb
210
- - spec/generator_spec/matchers/rails/controller_matcher_spec.rb
211
- - spec/generator_spec/matchers/rails/helper_matcher_spec.rb
212
- - spec/generator_spec/matchers/rails/mailer_matcher_spec.rb
213
- - spec/generator_spec/matchers/rails/model_matcher_spec.rb
214
- - spec/generator_spec/matchers/rails/observer_matcher_spec.rb
215
- - spec/generator_spec/matchers/rails/view_matcher_spec.rb
216
- - spec/generator_spec/rails_helpers/rails_app_spec.rb
217
- - spec/generator_spec/rails_helpers/rails_controller_spec.rb
218
- - spec/generator_spec/rails_helpers/rails_helper_spec.rb
219
- - spec/generator_spec/rails_helpers/rails_mailer_spec.rb
220
- - spec/generator_spec/rails_helpers/rails_migration_spec.rb
221
- - spec/generator_spec/rails_helpers/rails_model_spec.rb
222
- - spec/generator_spec/rails_helpers/rails_observer_spec.rb
223
- - spec/generator_spec/rails_helpers/rails_orm_spec.rb
224
- - spec/generator_spec/rails_helpers/rails_view_spec.rb
212
+ - spec/generator_spec/generators/controller_gen_spec.rb
213
+ - spec/generator_spec/generators/helper_gen_spec.rb
214
+ - spec/generator_spec/generators/migration_gen_spec.rb
215
+ - spec/generator_spec/generators/model_gen_spec.rb
216
+ - spec/generator_spec/generators/observer_gen_spec.rb
217
+ - spec/generator_spec/generators/view_gen_spec.rb
218
+ - spec/generator_spec/matchers/generate_artifact_spec.rb
219
+ - spec/generator_spec/matchers/generate_artifacts_spec.rb
225
220
  - spec/spec_helper.rb
226
221
  - wiki/Custom Rails 3 Generators.textile
227
222
  - wiki/content_matchers.textile
@@ -259,46 +254,14 @@ rubyforge_project:
259
254
  rubygems_version: 1.3.7
260
255
  signing_key:
261
256
  specification_version: 3
262
- summary: RSpec 2 library for writing generator specs
257
+ summary: RSpec 2 library add-on for testing generators
263
258
  test_files:
264
- - spec/generator_spec/generators/controller_generator_spec.rb
265
- - spec/generator_spec/generators/helper_generator_spec.rb
266
- - spec/generator_spec/generators/migration_generator_spec.rb
267
- - spec/generator_spec/generators/model_generator_spec.rb
268
- - spec/generator_spec/generators/observer_generator_spec.rb
269
- - spec/generator_spec/generators/view_generator_spec.rb
270
- - spec/generator_spec/matchers/content/class_self_spec.rb
271
- - spec/generator_spec/matchers/content/have_block_spec.rb
272
- - spec/generator_spec/matchers/content/have_call_spec.rb
273
- - spec/generator_spec/matchers/content/have_calls_spec.rb
274
- - spec/generator_spec/matchers/content/have_class_spec.rb
275
- - spec/generator_spec/matchers/content/have_method_spec.rb
276
- - spec/generator_spec/matchers/content/have_module_spec.rb
277
- - spec/generator_spec/matchers/content/have_region_spec.rb
278
- - spec/generator_spec/matchers/content/have_subclass_spec.rb
279
- - spec/generator_spec/matchers/content/include_module_spec.rb
280
- - spec/generator_spec/matchers/content/inherit_from_spec.rb
281
- - spec/generator_spec/matchers/file/directory_spec.rb
282
- - spec/generator_spec/matchers/file/file_spec.rb
283
- - spec/generator_spec/matchers/file/migration_spec.rb
284
- - spec/generator_spec/matchers/migration/have_column_spec.rb
285
- - spec/generator_spec/matchers/migration/have_index_spec.rb
286
- - spec/generator_spec/matchers/migration/have_table_spec.rb
287
- - spec/generator_spec/matchers/migration/have_tbl_column_spec.rb
288
- - spec/generator_spec/matchers/migration/have_up_down_spec.rb
289
- - spec/generator_spec/matchers/rails/controller_matcher_spec.rb
290
- - spec/generator_spec/matchers/rails/helper_matcher_spec.rb
291
- - spec/generator_spec/matchers/rails/mailer_matcher_spec.rb
292
- - spec/generator_spec/matchers/rails/model_matcher_spec.rb
293
- - spec/generator_spec/matchers/rails/observer_matcher_spec.rb
294
- - spec/generator_spec/matchers/rails/view_matcher_spec.rb
295
- - spec/generator_spec/rails_helpers/rails_app_spec.rb
296
- - spec/generator_spec/rails_helpers/rails_controller_spec.rb
297
- - spec/generator_spec/rails_helpers/rails_helper_spec.rb
298
- - spec/generator_spec/rails_helpers/rails_mailer_spec.rb
299
- - spec/generator_spec/rails_helpers/rails_migration_spec.rb
300
- - spec/generator_spec/rails_helpers/rails_model_spec.rb
301
- - spec/generator_spec/rails_helpers/rails_observer_spec.rb
302
- - spec/generator_spec/rails_helpers/rails_orm_spec.rb
303
- - spec/generator_spec/rails_helpers/rails_view_spec.rb
259
+ - spec/generator_spec/generators/controller_gen_spec.rb
260
+ - spec/generator_spec/generators/helper_gen_spec.rb
261
+ - spec/generator_spec/generators/migration_gen_spec.rb
262
+ - spec/generator_spec/generators/model_gen_spec.rb
263
+ - spec/generator_spec/generators/observer_gen_spec.rb
264
+ - spec/generator_spec/generators/view_gen_spec.rb
265
+ - spec/generator_spec/matchers/generate_artifact_spec.rb
266
+ - spec/generator_spec/matchers/generate_artifacts_spec.rb
304
267
  - spec/spec_helper.rb