genspec 0.2.0.prerails3.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,23 @@
1
+ .idea
2
+
3
+ ## MAC OS
4
+ .DS_Store
5
+
6
+ ## TEXTMATE
7
+ *.tmproj
8
+ tmtags
9
+
10
+ ## EMACS
11
+ *~
12
+ \#*
13
+ .\#*
14
+
15
+ ## VIM
16
+ *.swp
17
+
18
+ ## PROJECT::GENERAL
19
+ coverage
20
+ rdoc
21
+ pkg
22
+
23
+ ## PROJECT::SPECIFIC
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ -c
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source :gemcutter
2
+
3
+ gemspec
4
+
5
+ gem 'rails'
data/Gemfile.lock ADDED
@@ -0,0 +1,93 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ genspec (0.2.0)
5
+ i18n (~> 0.5.0)
6
+ rspec (~> 2.6.0)
7
+ sc-core-ext (~> 1.2.1)
8
+ thor (~> 0.14.6)
9
+
10
+ GEM
11
+ remote: http://rubygems.org/
12
+ specs:
13
+ abstract (1.0.0)
14
+ actionmailer (3.0.7)
15
+ actionpack (= 3.0.7)
16
+ mail (~> 2.2.15)
17
+ actionpack (3.0.7)
18
+ activemodel (= 3.0.7)
19
+ activesupport (= 3.0.7)
20
+ builder (~> 2.1.2)
21
+ erubis (~> 2.6.6)
22
+ i18n (~> 0.5.0)
23
+ rack (~> 1.2.1)
24
+ rack-mount (~> 0.6.14)
25
+ rack-test (~> 0.5.7)
26
+ tzinfo (~> 0.3.23)
27
+ activemodel (3.0.7)
28
+ activesupport (= 3.0.7)
29
+ builder (~> 2.1.2)
30
+ i18n (~> 0.5.0)
31
+ activerecord (3.0.7)
32
+ activemodel (= 3.0.7)
33
+ activesupport (= 3.0.7)
34
+ arel (~> 2.0.2)
35
+ tzinfo (~> 0.3.23)
36
+ activeresource (3.0.7)
37
+ activemodel (= 3.0.7)
38
+ activesupport (= 3.0.7)
39
+ activesupport (3.0.7)
40
+ arel (2.0.10)
41
+ builder (2.1.2)
42
+ diff-lcs (1.1.2)
43
+ erubis (2.6.6)
44
+ abstract (>= 1.0.0)
45
+ i18n (0.5.0)
46
+ mail (2.2.19)
47
+ activesupport (>= 2.3.6)
48
+ i18n (>= 0.4.0)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.16)
52
+ polyglot (0.3.1)
53
+ rack (1.2.2)
54
+ rack-mount (0.6.14)
55
+ rack (>= 1.0.0)
56
+ rack-test (0.5.7)
57
+ rack (>= 1.0)
58
+ rails (3.0.7)
59
+ actionmailer (= 3.0.7)
60
+ actionpack (= 3.0.7)
61
+ activerecord (= 3.0.7)
62
+ activeresource (= 3.0.7)
63
+ activesupport (= 3.0.7)
64
+ bundler (~> 1.0)
65
+ railties (= 3.0.7)
66
+ railties (3.0.7)
67
+ actionpack (= 3.0.7)
68
+ activesupport (= 3.0.7)
69
+ rake (>= 0.8.7)
70
+ thor (~> 0.14.4)
71
+ rake (0.9.2)
72
+ rspec (2.6.0)
73
+ rspec-core (~> 2.6.0)
74
+ rspec-expectations (~> 2.6.0)
75
+ rspec-mocks (~> 2.6.0)
76
+ rspec-core (2.6.4)
77
+ rspec-expectations (2.6.0)
78
+ diff-lcs (~> 1.1.2)
79
+ rspec-mocks (2.6.0)
80
+ sc-core-ext (1.2.1)
81
+ activesupport (>= 2.3.5)
82
+ thor (0.14.6)
83
+ treetop (1.4.9)
84
+ polyglot (>= 0.3.1)
85
+ tzinfo (0.3.27)
86
+
87
+ PLATFORMS
88
+ ruby
89
+
90
+ DEPENDENCIES
91
+ bundler (= 1.0.15)
92
+ genspec!
93
+ rails
data/README.rdoc CHANGED
@@ -1,20 +1,21 @@
1
- = genspec
1
+ = GenSpec
2
2
 
3
- Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.
3
+ Simple, expressive generator testing for RSpec. This version of GenSpec supports testing either Thor generators (in standalone applications/gems) or Rails 3 generators for Rails apps.
4
4
 
5
- == Installation
5
+ For the Rails 2.3 version, use genspec 0.1.x. Note that it is no longer actively maintained; only bug fixes will be committed to the Rails 2.3 version of this gem.
6
6
 
7
- sudo gem install genspec --pre
7
+ == Installation
8
8
 
9
- ...then, in your Gemfile...
9
+ In your Gemfile...
10
10
 
11
11
  group :test do
12
12
  config.gem 'genspec'
13
13
  end
14
-
15
- Warning: The prerelease version is for Rails 3.0 and is NOT compatible with 2.x! See the master branch
16
- for the Rails 2.3 version.
17
-
14
+
15
+ Or, the manual way:
16
+
17
+ sudo gem install genspec --pre
18
+
18
19
  == Usage
19
20
 
20
21
  Just like rspec-rails uses the structure of your spec/ directory to infer which test is being run (controllers,
@@ -31,128 +32,204 @@ A basic generator spec might look something like this:
31
32
  end
32
33
  end
33
34
 
34
- context "with a name argument" do
35
- with_args :users
36
-
35
+ with_args :users do
37
36
  it "should generate a UsersController" do
38
- subject.should generate("app/controllers/users_controller.rb")
37
+ subject.should generate("app/controllers/users_controller.rb") { |content|
38
+ content.should =~ /class UserController/
39
+ }
39
40
  end
40
41
  end
41
42
  end
42
43
 
43
- === Specifying Arguments
44
+ === Checking Generated Files
44
45
 
45
- You may have noticed in the example above that we used _with_args_ to set up arguments passed into the generator. We
46
- can also pass any options we wish into that array. For instance, to pretend the _--verbose_ option was passed, we
47
- could use the following spec:
46
+ This is the preferred way to test files that were generated, because this matcher checks your generator's *behavior*. The test won't care _how_ a file is generated, as long as it _is_ generated. It's as simple as passing the name of the file you expected to be generated:
48
47
 
49
- describe :custom_controller do
50
- context "with --verbose option" do
51
- with_args "--verbose"
52
-
53
- # . . .
54
- end
48
+ it "should generate a readme file" do
49
+ subject.should generate("README")
50
+ end
51
+
52
+ You can also check the generated file's content by simply passing a block. The _content_ argument in the block is
53
+ a simple String containing the content of the file:
54
+
55
+ it "should generate a model called 'user'" do
56
+ subject.should generate("app/models/user.rb") { |content|
57
+ content.should =~ /class User < ActiveRecord\:\:Base/
58
+ }
59
+ end
60
+
61
+ You can also very simply ensure that the generator runs without error, without any further validation, by omitting all arguments:
62
+
63
+ it "should generate successfully" do
64
+ subject.should generate
65
+ end
66
+
67
+ Finally, you could pass a block but no other arguments to +generate+ in order to check the generator's results the old-fashioned way:
68
+
69
+ it "should generate a model called 'user'" do
70
+ subject.should generate {
71
+ File.read("app/models/user.rb").should =~ /class User < ActiveRecord\:\:Base/
72
+ }
55
73
  end
56
74
 
57
- Here is another example using _with_args_:
75
+ === Checking Generator Actions
58
76
 
59
- describe :custom_controller do
60
- context "with a users controller and index, new, edit actions" do
61
- with_args :users, :index, :new, :edit
62
-
63
- # . . .
64
- end
77
+ This is the most intrusive form of generation matching. While powerful, it will also make your tests brittle, because there's a high likelihood that even minor changes to your generators will require you to update the spec to match.
78
+
79
+ However, sometimes you need to verify that some action occurs which can't be validated using the methods above. You can use the generation method matcher for this.
80
+
81
+ All 3 of the following examples perform exactly the same test. Use whichever seems the most expressive to you. (I prefer the first one.)
82
+
83
+ it "should add a gem source" do
84
+ subject.should add_source("http://gems.github.com")
65
85
  end
66
86
 
67
- Note that no matter what you specify as arguments, they'll be converted to an array of Strings -- because this is what
68
- gets passed into the generator if you run it from the command line. You can bypass that by passing an :object => true
69
- option as the last argument:
87
+ # -or-
88
+ it "should add a gem source" do
89
+ subject.should call_action(:add_source, "http://gems.github.com")
90
+ end
70
91
 
71
- describe :custom_controller do
72
- with_args MyFancyObject.new, :object => true
73
- # . . .
92
+ # -or-
93
+ it "should add a gem source" do
94
+ subject.should generate(:add_source, "http://gems.github.com")
74
95
  end
75
96
 
76
- Finally, you can also let with_args generate a context for you:
97
+ You can stop passing arguments at any time. This has the effect of widening the range of acceptable parameters. For
98
+ instance, the following example does the same thing but will accept _any_ source URL, as long as the _add_source_
99
+ action is called:
77
100
 
78
- describe :custom_controller do
79
- with_args :users, :index, :new, :edit do
80
- # . . .
81
- end
101
+ it "should add a gem source" do
102
+ subject.should generate(:add_source)
82
103
  end
83
104
 
84
- This will generate an RSpec context that reads something like, "...with arguments [:users, :index, :new, :edit]".
105
+ Similarly, you can get away with specifying only the some of a sequence of arguments; the omitted arguments will accept any value, while the specified ones will be tested. Another example:
106
+
107
+ it "should inject into file" do
108
+ subject.should inject_into_file("config/environment.rb", "config.gem :thor")
109
+ end
110
+
111
+ # if the generator includes the following action, the test will
112
+ # pass even though the +after+ option wasn't specified in the spec:
113
+ #
114
+ # inject_into_file "config/environment.rb", "config.gem :thor",
115
+ # :after => "Rails::Initializer.run do |config|\n"
116
+ #
117
+
118
+ You can test in this way using any public instance method in the +Thor::Actions+, +Rails::Generators::Actions+
119
+ or +Rails::Generators::Migration+ modules. You can change this behavior by modifying the
120
+ +GenSpec::Matchers::GenerationMethodMatchers::GENERATION_CLASSES+ array.
85
121
 
86
122
  === Checking for Output
87
123
 
88
- If you need to test the generator's feedback rather than the generator's results, you can use the _output_ matcher to
89
- assert that your generator has produced some specific content in its output (which would be either a logger of some
90
- sort or $stdout). This is helpful for making sure your help message is accurate, for instance.
124
+ If you need to test the generator's feedback rather than the generator's results, you can use the _output_ matcher to assert that your generator has produced some specific content in its output. This is helpful for making sure your help message is accurate, for instance.
91
125
 
92
- # Ex 1: String
126
+ # Example 1: String
93
127
  it "should generate a help message" do
94
128
  subject.should output("A Help Message")
95
129
  end
96
-
97
- # Ex 2: Regular Expression
130
+
131
+ # Example 2: Regular Expression
98
132
  it "should generate a help message" do
99
133
  subject.should output(/A [hH]elp Message/)
100
134
  end
101
135
 
102
136
 
103
- === Checking Generated Files
137
+ == More Advanced Usage
104
138
 
105
- This is the preferred way to test which files were actually generated, because this matcher checks your
106
- generator's *behavior*. That means it won't care _how_ a file is generated, as long as it _is_ generated. It's as simple
107
- as passing the name of the file you expected to be generated:
139
+ === Preparing Input
108
140
 
109
- it "should generate a readme file" do
110
- subject.should generate("README")
141
+ Sometimes your generator needs to prompt for input. For instance, maybe it's encountered a file that is about
142
+ to be overwritten and needs to check whether the user really wants to commit to the changes. You can prepare input streams like so:
143
+
144
+ with_input "y\n" do
145
+ it "should do something" do
146
+ # . . .
147
+ end
111
148
  end
112
-
113
- You can also check the generated file's content by simply passing a block. The _content_ argument in the block is
114
- a simple String containing the content of the file:
115
149
 
116
- it "should generate a model called 'user'" do
117
- subject.should generate("app/models/user.rb") { |content|
118
- content.should =~ /class User < ActiveRecord\:\:Base/
119
- }
150
+ with_input <<-end_input do
151
+ y
152
+ n
153
+ a
154
+ end_input
155
+ it "should do a particular set of somethings" do
156
+ # . . .
157
+ end
120
158
  end
121
159
 
122
- === Checking Generation Methods
160
+ Of course, preparing an input stream requires for you to know in advance which questions the generator will be asking, but your specs should be testing exactly this behavior, so this is not an issue.
123
161
 
124
- This is the most intrusive form of generation matching. While powerful, it will also make your tests brittle, because
125
- there's a high likelihood that even minor changes to your generators will require you to update the spec to match.
126
162
 
127
- However, sometimes you need to verify that some action occurs which can't be validated using the methods above, such
128
- as adding a gem source to the Gemfile. You can use the generation method matcher for this.
163
+ === Specifying Arguments
129
164
 
130
- it "should add a gem source" do
131
- subject.should generate(:add_source, "http://gems.github.com")
165
+ You can pass any combination of command line arguments or options to your generator using +with_args+. For instance, to pretend the _--verbose_ option was passed, we could use the following spec:
166
+
167
+ describe :custom_controller do
168
+ with_args "--verbose" do
169
+ it "should produce verbose output" do
170
+ # . . .
171
+ end
172
+ end
132
173
  end
133
174
 
134
- # -or-
135
- it "should add a gem source" do
136
- subject.should call_action(:add_source, "http://gems.github.com")
175
+ Here is another example using +with_args+:
176
+
177
+ describe :custom_controller do
178
+ with_args :users, :index, :new, :edit do
179
+ it "should produce an index action" do
180
+ # . . .
181
+ end
182
+ end
137
183
  end
138
184
 
139
- # -or-
140
- it "should add a gem source" do
141
- subject.should add_source("http://gems.github.com")
185
+ Note that no matter what you specify as arguments, by default they'll be initially converted to an array of Strings because that's what gets passed into the generator if you run it from the command line. You can bypass this behavior by passing an <em>:object => true</em> option as the last argument:
186
+
187
+ describe :custom_controller do
188
+ with_args MyFancyObject.new, :object => true do
189
+ # . . .
190
+ end
142
191
  end
143
-
144
- Note that all three of the above examples accomplish exactly the same task. Use whichever is most expressive for you.
145
192
 
146
- You can stop passing arguments at any time. This has the effect of widening the range of acceptable parameters. For
147
- instance, the following example does the same thing but will accept _any_ source URL, as long as the _add_source_
148
- action is called:
193
+ Finally, you can also choose to use +with_args+ without a block, in which case it will be applied to the current context:
149
194
 
150
- it "should add a gem source" do
151
- subject.should generate(:add_source)
195
+ describe :custom_controller do
196
+ context "a Users controller with index, new, and edit actions" do
197
+ with_args :users, :index, :new, :edit
198
+
199
+ # . . .
200
+ end
152
201
  end
153
202
 
154
- Any method added to Thor, the backend code that drives Rails generators, should be picked up automatically by
155
- GenSpec.
203
+ === Fixtures
204
+
205
+ Most generators will assume you have some basic file structure in place. For instance, a controller generator that automatically adds routes for the controller may assume that a +config/routes.rb+ file exists prior to running it. Constructing a dummy file structure prior to testing is a necessity in such scenarios. Luckily, GenSpec provides an easy way to do just that:
206
+
207
+ describe :custom_controller do
208
+ within_source_root do
209
+ mkdir_p "config"
210
+ touch "config/routes.rb"
211
+ end
212
+
213
+ # . . .
214
+ end
215
+
216
+ You can even nest such structures within various contexts:
217
+
218
+ describe :custom_controller do
219
+ within_source_root { mkdir_p "config" }
220
+
221
+ context "with a routes file" do
222
+ within_source_root { touch "config/routes.rb" }
223
+
224
+ it "should insert the new route" do
225
+ subject.should generate {
226
+ File.read("config/routes.rb").should_not be_blank
227
+ }
228
+ end
229
+ end
230
+ end
231
+
232
+ Fixture generation will always happen in the same order -- from the top-level context to the bottom-level context -- which means you are free to build the dummy file system incrementally, as needed, without worrying about order of operation.
156
233
 
157
234
 
158
235
  == Note on Patches/Pull Requests
@@ -167,4 +244,4 @@ GenSpec.
167
244
 
168
245
  == Copyright
169
246
 
170
- Copyright (c) 2010 Colin MacKenzie IV. See LICENSE for details.
247
+ Copyright (c) 2010-2011 Colin MacKenzie IV. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,99 +1,19 @@
1
1
  require 'rubygems'
2
- require 'rake'
3
- begin
4
- require 'rspec/core'
5
- require 'rspec/core/rake_task'
6
- rescue MissingSourceFile
7
- module RSpec
8
- module Core
9
- class RakeTask
10
- def initialize(name)
11
- task name do
12
- # if rspec-rails is a configured gem, this will output helpful material and exit ...
13
- require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
2
+ require 'bundler/gem_tasks'
14
3
 
15
- # ... otherwise, do this:
16
- raise <<-MSG
17
-
18
- #{"*" * 80}
19
- * You are trying to run an rspec rake task defined in
20
- * #{__FILE__},
21
- * but rspec can not be found in vendor/gems, vendor/plugins or system gems.
22
- #{"*" * 80}
23
- MSG
24
- end
25
- end
26
- end
27
- end
28
- end
29
- end
30
-
31
- def rcov_opts
32
- IO.readlines("spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
33
- end
34
-
35
- begin
36
- require 'jeweler'
37
- Jeweler::Tasks.new do |gem|
38
- gem.name = "genspec"
39
- gem.summary = "Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x."
40
- gem.description = "Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x."
41
- gem.email = "sinisterchipmunk@gmail.com"
42
- gem.homepage = "http://www.thoughtsincomputation.com"
43
- gem.authors = ["Colin MacKenzie IV"]
44
- gem.files = FileList['**/*']
45
- gem.add_dependency "rspec", ">= 2.0.0.beta.14"
46
- gem.add_dependency "sc-core-ext", ">= 1.2.1"
47
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
48
- end
49
- Jeweler::GemcutterTasks.new
50
- rescue LoadError
51
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
4
+ def run(*args)
5
+ raise "tests failed" unless system *args
52
6
  end
53
7
 
54
- desc "Run all specs in spec directory"
55
- RSpec::Core::RakeTask.new(:spec) do |t|
56
- t.pattern = 'spec/**/*_spec.rb'
57
- t.rcov = false
8
+ task :default do
9
+ run "rspec", "spec"
10
+ ENV['RAILS'] = '1'
11
+ run "rspec", "spec"
58
12
  end
59
13
 
60
- desc "Spec coverage"
61
- RSpec::Core::RakeTask.new(:rcov) do |t|
62
- t.pattern = 'vendor/cache/genspec/spec/**/*_spec.rb'
63
- # t.spec_opts = ['--options', 'spec/spec.opts']
64
- t.rcov = true
65
- t.rcov_path = 'coverage'
66
- t.rcov_opts = rcov_opts
67
- end
68
-
69
- task :default => [:check_dependencies, :spec]
70
-
71
- #desc "rebuilds the package and then copies the .gem file back a directory"
72
- #task :bundle => :build do
73
- # Dir["../cache/genspec-*.gem"].each { |f| rm File.expand_path(f) }
74
- # Dir["pkg/*.gem"].each { |f| cp File.expand_path(f), File.expand_path('../cache') }
75
- #end
76
- #
77
- #namespace :bundle do
78
- # desc "builds and installs the gem, then runs bundle package, then uninstalls the gem"
79
- # task :lock => [:install, :rebundle, :uninstall]
80
- #
81
- # desc "runs 'bundle package' in the rails project"
82
- # task :rebundle do
83
- # chdir File.expand_path(File.join(File.dirname(__FILE__), "../..")) do
84
- # system("bundle package")
85
- # end
86
- # end
87
- #
88
- # desc "uninstalls the gem"
89
- # task :uninstall do
90
- # system("gem uninstall genspec")
91
- # end
92
- #end
93
-
94
14
  require 'rake/rdoctask'
95
15
  Rake::RDocTask.new do |rdoc|
96
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
16
+ version = GenSpec::VERSION
97
17
 
98
18
  rdoc.rdoc_dir = 'rdoc'
99
19
  rdoc.title = "genspec #{version}"
data/genspec.gemspec CHANGED
@@ -1,78 +1,32 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
5
2
 
3
+ require File.expand_path("lib/genspec/version", File.dirname(__FILE__))
4
+
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{genspec}
8
- s.version = "0.2.0.prerails3.2"
6
+ s.name = 'genspec'
7
+ s.version = GenSpec::VERSION
9
8
 
10
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
9
  s.authors = ["Colin MacKenzie IV"]
12
- s.date = %q{2010-07-08}
13
- s.description = %q{Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.}
14
- s.email = %q{sinisterchipmunk@gmail.com}
10
+ s.date = '2010-07-08'
11
+ s.description = %q{Simple, expressive Thor and/or Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.}
12
+ s.email = 'sinisterchipmunk@gmail.com'
15
13
  s.extra_rdoc_files = [
16
14
  "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- "LICENSE",
21
- "README.rdoc",
22
- "Rakefile",
23
- "VERSION",
24
- "genspec.gemspec",
25
- "lib/gen_spec.rb",
26
- "lib/genspec.rb",
27
- "lib/genspec/generator_example_group.rb",
28
- "lib/genspec/matchers.rb",
29
- "lib/genspec/matchers/base.rb",
30
- "lib/genspec/matchers/generation_method_matcher.rb",
31
- "lib/genspec/matchers/output_matcher.rb",
32
- "lib/genspec/matchers/result_matcher.rb",
33
- "lib/genspec/shell.rb",
34
- "pkg/genspec-0.1.1.gem",
35
- "pkg/genspec-0.2.0.prerails3.1.gem",
36
- "pkg/genspec-0.2.0.prerails3.2.gem",
37
- "spec/environment_spec.rb",
38
- "spec/generators/migration_spec.rb",
39
- "spec/generators/test_rails3_spec.rb",
40
- "spec/rcov.opts",
41
- "spec/rspec.opts",
42
- "spec/spec_helper.rb",
43
- "spec/support/generators/my_migration/my_migration_generator.rb",
44
- "spec/support/generators/test_rails3/USAGE",
45
- "spec/support/generators/test_rails3/templates/file",
46
- "spec/support/generators/test_rails3/test_rails3_generator.rb"
15
+ "README.rdoc"
47
16
  ]
17
+ s.files = `git ls-files`.split(/\n/)
48
18
  s.homepage = %q{http://www.thoughtsincomputation.com}
49
19
  s.rdoc_options = ["--charset=UTF-8"]
50
20
  s.require_paths = ["lib"]
51
21
  s.rubygems_version = %q{1.3.7}
52
- s.summary = %q{Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.}
53
- s.test_files = [
54
- "spec/environment_spec.rb",
55
- "spec/generators/migration_spec.rb",
56
- "spec/generators/test_rails3_spec.rb",
57
- "spec/spec_helper.rb",
58
- "spec/support/generators/my_migration/my_migration_generator.rb",
59
- "spec/support/generators/test_rails3/test_rails3_generator.rb"
60
- ]
61
-
62
- if s.respond_to? :specification_version then
63
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
64
- s.specification_version = 3
22
+ s.summary = %q{Simple, expressive Thor and/or Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.}
23
+ s.test_files = Dir["spec/**/*"]
65
24
 
66
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
67
- s.add_runtime_dependency(%q<rspec>, [">= 2.0.0.beta.14"])
68
- s.add_runtime_dependency(%q<sc-core-ext>, [">= 1.2.1"])
69
- else
70
- s.add_dependency(%q<rspec>, [">= 2.0.0.beta.14"])
71
- s.add_dependency(%q<sc-core-ext>, [">= 1.2.1"])
72
- end
73
- else
74
- s.add_dependency(%q<rspec>, [">= 2.0.0.beta.14"])
75
- s.add_dependency(%q<sc-core-ext>, [">= 1.2.1"])
76
- end
25
+ s.add_dependency 'thor', '~> 0.14.6'
26
+ s.add_dependency 'rspec', "~> 2.6.0"
27
+ s.add_dependency 'sc-core-ext', "~> 1.2.1"
28
+ s.add_dependency 'i18n', '~> 0.5.0'
29
+
30
+ s.add_development_dependency 'bundler', '= 1.0.15'
77
31
  end
78
32