ammeter 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,9 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
19
 
20
- s.add_runtime_dependency 'railties', '~> 3'
21
- s.add_runtime_dependency 'rspec', '~> 2'
22
- s.add_runtime_dependency 'rspec-rails', '~> 2'
20
+ s.add_runtime_dependency 'railties', '~> 3'
21
+ s.add_runtime_dependency 'activesupport', '~> 3'
22
+ s.add_runtime_dependency 'rspec', '~> 2'
23
+ s.add_runtime_dependency 'rspec-rails', '~> 2'
23
24
 
24
25
  s.add_development_dependency 'rails', '~> 3.1'
25
26
  s.add_development_dependency 'uglifier'
@@ -1,4 +1,5 @@
1
1
  require 'rails'
2
+ require 'active_support'
2
3
 
3
4
  # Ensure that Rails has loaded & Initialized
4
5
  if Rails::VERSION::STRING >= "3.1"
@@ -1,7 +1,8 @@
1
+ require 'rspec/core'
1
2
  require 'ammeter/rspec/generator/example/generator_example_group'
2
3
 
3
4
  RSpec::configure do |c|
4
5
  c.include Ammeter::RSpec::Rails::GeneratorExampleGroup, :type => :generator, :example_group => {
5
- :file_path => c.escaped_path(%w[spec generators])
6
+ :file_path => /spec[\\\/]generators/
6
7
  }
7
8
  end
@@ -1,5 +1,7 @@
1
1
  require 'rails/generators'
2
- require 'rspec/rails'
2
+ require 'active_support/core_ext'
3
+ require 'rspec/rails/adapters'
4
+ require 'rspec/rails/example/rails_example_group'
3
5
 
4
6
  module Ammeter
5
7
  module RSpec
@@ -3,7 +3,7 @@ RSpec::Matchers.define :contain do |expected_content|
3
3
  @actual_contents = File.new(file_path).read
4
4
  case expected_content
5
5
  when String
6
- @actual_contents == expected_content
6
+ @actual_contents.include? expected_content
7
7
  when Regexp
8
8
  @actual_contents =~ expected_content
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Ammeter
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -11,6 +11,8 @@ describe "contain" do
11
11
  File.stub(:new).with('/some/file/path').and_return(mock_file)
12
12
  end
13
13
  it { should contain "This file\ncontains\nthis text" }
14
+ it { should contain "This file" }
15
+ it { should contain "this text" }
14
16
  it { should contain /This file/ }
15
17
  it { should contain /this text/ }
16
18
  it { should_not contain /something not there/ }
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ammeter
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 31
4
5
  prerelease:
5
- version: 0.1.1
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 2
10
+ version: 0.1.2
6
11
  platform: ruby
7
12
  authors:
8
13
  - Alex Rothenberg
@@ -10,152 +15,208 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-09-01 00:00:00 -04:00
18
+ date: 2011-09-30 00:00:00 -04:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
17
- name: railties
22
+ prerelease: false
18
23
  requirement: &id001 !ruby/object:Gem::Requirement
19
24
  none: false
20
25
  requirements:
21
26
  - - ~>
22
27
  - !ruby/object:Gem::Version
28
+ hash: 5
29
+ segments:
30
+ - 3
23
31
  version: "3"
24
32
  type: :runtime
25
- prerelease: false
33
+ name: railties
26
34
  version_requirements: *id001
27
35
  - !ruby/object:Gem::Dependency
28
- name: rspec
36
+ prerelease: false
29
37
  requirement: &id002 !ruby/object:Gem::Requirement
30
38
  none: false
31
39
  requirements:
32
40
  - - ~>
33
41
  - !ruby/object:Gem::Version
34
- version: "2"
42
+ hash: 5
43
+ segments:
44
+ - 3
45
+ version: "3"
35
46
  type: :runtime
36
- prerelease: false
47
+ name: activesupport
37
48
  version_requirements: *id002
38
49
  - !ruby/object:Gem::Dependency
39
- name: rspec-rails
50
+ prerelease: false
40
51
  requirement: &id003 !ruby/object:Gem::Requirement
41
52
  none: false
42
53
  requirements:
43
54
  - - ~>
44
55
  - !ruby/object:Gem::Version
56
+ hash: 7
57
+ segments:
58
+ - 2
45
59
  version: "2"
46
60
  type: :runtime
47
- prerelease: false
61
+ name: rspec
48
62
  version_requirements: *id003
49
63
  - !ruby/object:Gem::Dependency
50
- name: rails
64
+ prerelease: false
51
65
  requirement: &id004 !ruby/object:Gem::Requirement
52
66
  none: false
53
67
  requirements:
54
68
  - - ~>
55
69
  - !ruby/object:Gem::Version
56
- version: "3.1"
57
- type: :development
58
- prerelease: false
70
+ hash: 7
71
+ segments:
72
+ - 2
73
+ version: "2"
74
+ type: :runtime
75
+ name: rspec-rails
59
76
  version_requirements: *id004
60
77
  - !ruby/object:Gem::Dependency
61
- name: uglifier
78
+ prerelease: false
62
79
  requirement: &id005 !ruby/object:Gem::Requirement
63
80
  none: false
64
81
  requirements:
65
- - - ">="
82
+ - - ~>
66
83
  - !ruby/object:Gem::Version
67
- version: "0"
84
+ hash: 5
85
+ segments:
86
+ - 3
87
+ - 1
88
+ version: "3.1"
68
89
  type: :development
69
- prerelease: false
90
+ name: rails
70
91
  version_requirements: *id005
71
92
  - !ruby/object:Gem::Dependency
72
- name: turn
93
+ prerelease: false
73
94
  requirement: &id006 !ruby/object:Gem::Requirement
74
95
  none: false
75
96
  requirements:
76
97
  - - ">="
77
98
  - !ruby/object:Gem::Version
99
+ hash: 3
100
+ segments:
101
+ - 0
78
102
  version: "0"
79
103
  type: :development
80
- prerelease: false
104
+ name: uglifier
81
105
  version_requirements: *id006
82
106
  - !ruby/object:Gem::Dependency
83
- name: rake
107
+ prerelease: false
84
108
  requirement: &id007 !ruby/object:Gem::Requirement
85
109
  none: false
86
110
  requirements:
87
111
  - - ">="
88
112
  - !ruby/object:Gem::Version
113
+ hash: 3
114
+ segments:
115
+ - 0
89
116
  version: "0"
90
117
  type: :development
91
- prerelease: false
118
+ name: turn
92
119
  version_requirements: *id007
93
120
  - !ruby/object:Gem::Dependency
94
- name: coffee-rails
121
+ prerelease: false
95
122
  requirement: &id008 !ruby/object:Gem::Requirement
96
123
  none: false
97
124
  requirements:
98
125
  - - ">="
99
126
  - !ruby/object:Gem::Version
127
+ hash: 3
128
+ segments:
129
+ - 0
100
130
  version: "0"
101
131
  type: :development
102
- prerelease: false
132
+ name: rake
103
133
  version_requirements: *id008
104
134
  - !ruby/object:Gem::Dependency
105
- name: sass-rails
135
+ prerelease: false
106
136
  requirement: &id009 !ruby/object:Gem::Requirement
107
137
  none: false
108
138
  requirements:
109
139
  - - ">="
110
140
  - !ruby/object:Gem::Version
141
+ hash: 3
142
+ segments:
143
+ - 0
111
144
  version: "0"
112
145
  type: :development
113
- prerelease: false
146
+ name: coffee-rails
114
147
  version_requirements: *id009
115
148
  - !ruby/object:Gem::Dependency
116
- name: jquery-rails
149
+ prerelease: false
117
150
  requirement: &id010 !ruby/object:Gem::Requirement
118
151
  none: false
119
152
  requirements:
120
153
  - - ">="
121
154
  - !ruby/object:Gem::Version
155
+ hash: 3
156
+ segments:
157
+ - 0
122
158
  version: "0"
123
159
  type: :development
124
- prerelease: false
160
+ name: sass-rails
125
161
  version_requirements: *id010
126
162
  - !ruby/object:Gem::Dependency
127
- name: cucumber
163
+ prerelease: false
128
164
  requirement: &id011 !ruby/object:Gem::Requirement
129
165
  none: false
130
166
  requirements:
131
- - - ~>
167
+ - - ">="
132
168
  - !ruby/object:Gem::Version
133
- version: "0.10"
169
+ hash: 3
170
+ segments:
171
+ - 0
172
+ version: "0"
134
173
  type: :development
135
- prerelease: false
174
+ name: jquery-rails
136
175
  version_requirements: *id011
137
176
  - !ruby/object:Gem::Dependency
138
- name: aruba
177
+ prerelease: false
139
178
  requirement: &id012 !ruby/object:Gem::Requirement
140
179
  none: false
141
180
  requirements:
142
181
  - - ~>
143
182
  - !ruby/object:Gem::Version
144
- version: "0.3"
183
+ hash: 31
184
+ segments:
185
+ - 0
186
+ - 10
187
+ version: "0.10"
145
188
  type: :development
146
- prerelease: false
189
+ name: cucumber
147
190
  version_requirements: *id012
148
191
  - !ruby/object:Gem::Dependency
149
- name: sqlite3
192
+ prerelease: false
150
193
  requirement: &id013 !ruby/object:Gem::Requirement
151
194
  none: false
152
195
  requirements:
153
196
  - - ~>
154
197
  - !ruby/object:Gem::Version
155
- version: "1"
198
+ hash: 13
199
+ segments:
200
+ - 0
201
+ - 3
202
+ version: "0.3"
156
203
  type: :development
157
- prerelease: false
204
+ name: aruba
158
205
  version_requirements: *id013
206
+ - !ruby/object:Gem::Dependency
207
+ prerelease: false
208
+ requirement: &id014 !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ~>
212
+ - !ruby/object:Gem::Version
213
+ hash: 1
214
+ segments:
215
+ - 1
216
+ version: "1"
217
+ type: :development
218
+ name: sqlite3
219
+ version_requirements: *id014
159
220
  description: Write specs for your Rails 3 generators
160
221
  email:
161
222
  - alex@alexrothenberg.com
@@ -188,10 +249,10 @@ files:
188
249
  - lib/ammeter/rspec/generator/matchers/contain.rb
189
250
  - lib/ammeter/rspec/generator/matchers/exist.rb
190
251
  - lib/ammeter/version.rb
252
+ - spec/ammeter/rspec/generator/matchers/be_a_migration_spec.rb
253
+ - spec/ammeter/rspec/generator/matchers/contain_spec.rb
254
+ - spec/ammeter/rspec/generator/matchers/exist_spec.rb
191
255
  - spec/ammeter/rspec/rails/generator/example/generator_example_group_spec.rb
192
- - spec/ammeter/rspec/rails/generator/matchers/be_a_migration_spec.rb
193
- - spec/ammeter/rspec/rails/generator/matchers/contain_spec.rb
194
- - spec/ammeter/rspec/rails/generator/matchers/exist_spec.rb
195
256
  - spec/spec_helper.rb
196
257
  - spec/support/helpers.rb
197
258
  has_rdoc: true
@@ -208,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
269
  requirements:
209
270
  - - ">="
210
271
  - !ruby/object:Gem::Version
211
- hash: -535140803606819433
272
+ hash: 3
212
273
  segments:
213
274
  - 0
214
275
  version: "0"
@@ -217,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
278
  requirements:
218
279
  - - ">="
219
280
  - !ruby/object:Gem::Version
220
- hash: -535140803606819433
281
+ hash: 3
221
282
  segments:
222
283
  - 0
223
284
  version: "0"
@@ -233,9 +294,9 @@ test_files:
233
294
  - features/support/env.rb
234
295
  - features/templates/generate_example_app.rb
235
296
  - features/templates/rspec.rake
297
+ - spec/ammeter/rspec/generator/matchers/be_a_migration_spec.rb
298
+ - spec/ammeter/rspec/generator/matchers/contain_spec.rb
299
+ - spec/ammeter/rspec/generator/matchers/exist_spec.rb
236
300
  - spec/ammeter/rspec/rails/generator/example/generator_example_group_spec.rb
237
- - spec/ammeter/rspec/rails/generator/matchers/be_a_migration_spec.rb
238
- - spec/ammeter/rspec/rails/generator/matchers/contain_spec.rb
239
- - spec/ammeter/rspec/rails/generator/matchers/exist_spec.rb
240
301
  - spec/spec_helper.rb
241
302
  - spec/support/helpers.rb