spec_producer 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d0a6951a87afcd5cddb9a36b20c6a1174af38c6
4
- data.tar.gz: 5b714d4b2acedaf902aabc82d240057fc751f05f
3
+ metadata.gz: 6e7e34624e59e659c2379b4dae35d243354ed18e
4
+ data.tar.gz: 18a8a15034a4c863e8f87df51fb30e623e1b4a63
5
5
  SHA512:
6
- metadata.gz: d55184e57a8c084392ec28da53a09f644b43a1a902a3eec92fa6b7fbbd0153fdb805d49bab089f48a57cf94abd24c58b95550fa46f51da280194943572a69d94
7
- data.tar.gz: 2eee575741de47e967b687086fc26138e1ed9b1531ceb405f9a382c67dc2ccda3cfd6e5554e4147b2b040021c274a203bf78acf62a38ee9d7c70386cff96a2df
6
+ metadata.gz: 6a2b462c791110af7912cbbf9793b347c967d09dc3a458cb38e78a0f4a9091a8ffdc9697aa91551567e269bc98a6cf1e4546b68f9b90efbec7a41c8a60145447
7
+ data.tar.gz: 01e8f75d840c1c9f3928b208d3c018370f77db0cf305eee3ff76f4b9bd98c587f2e4b0d92f559817e69593f3bb8528aac149f494ac13de7e1443b9a19841b761
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.6.0 (2016-08-09)
2
+
3
+ Features:
4
+ * Update all produced specs to specify the proper type of it to comply with rspec 3.5 and onwards
5
+
1
6
  ## 0.5.0 (2016-08-02)
2
7
 
3
8
  Features:
data/lib/spec_producer.rb CHANGED
@@ -16,7 +16,7 @@ module SpecProducer
16
16
 
17
17
  ActiveRecord::Base.descendants.each do |descendant|
18
18
  final_text = "require 'rails_helper'\n\n"
19
- final_text << "describe #{descendant.name} do\n"
19
+ final_text << "describe #{descendant.name}, :type => :model do\n"
20
20
 
21
21
  descendant.attribute_names.each do |attribute|
22
22
  final_text << " it { should respond_to :#{attribute}, :#{attribute}= }\n"
@@ -129,7 +129,7 @@ module SpecProducer
129
129
 
130
130
  routes.group_by { |route| route[:controller] }.each do |route_group|
131
131
  final_text = "require 'rails_helper'\n\n"
132
- final_text << "describe '#{route_group[0]} routes' do\n"
132
+ final_text << "describe '#{route_group[0]} routes', :type => :routing do\n"
133
133
 
134
134
  route_group[1].each do |route|
135
135
  final_text << " it \"#{route[:verb].upcase} #{route[:path]} should route to '#{route[:controller]}##{route[:action]}'\" do\n"
@@ -209,7 +209,7 @@ module SpecProducer
209
209
 
210
210
  file_name = "#{file.gsub('app/', 'spec/')}_spec.rb"
211
211
  final_text = "require 'rails_helper'\n\n"
212
- final_text << "describe '#{file.gsub('app/views/', '')}' do\n"
212
+ final_text << "describe '#{file.gsub('app/views/', '')}', :type => :view do\n"
213
213
  final_text << " before do\n"
214
214
  final_text << " render\n"
215
215
  final_text << " end\n\n"
@@ -249,7 +249,7 @@ module SpecProducer
249
249
 
250
250
  file_name = "#{file.gsub('app/', 'spec/').gsub('.rb', '')}_spec.rb"
251
251
  final_text = "require 'rails_helper'\n\n"
252
- final_text << "describe #{File.basename(file, ".rb").camelcase} do\n"
252
+ final_text << "describe #{File.basename(file, ".rb").camelcase}, :type => :helper do\n"
253
253
  final_text << " pending 'view helper tests'\n"
254
254
  final_text << "end"
255
255
 
@@ -293,7 +293,7 @@ module SpecProducer
293
293
 
294
294
  file_name = "#{path_name.gsub('app/', 'spec/')}_spec.rb"
295
295
  final_text = "require 'rails_helper'\n\n"
296
- final_text << "describe #{descendant.name} do\n"
296
+ final_text << "describe #{descendant.name}, :type => :controller do\n"
297
297
 
298
298
  descendant.action_methods.each do |method|
299
299
  final_text << " pending '##{method}'\n"
@@ -1,3 +1,3 @@
1
1
  module SpecProducer
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spec_producer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasilis Kalligas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-01 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler