spec_producer 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +3 -0
- data/lib/spec_producer.rb +4 -2
- data/lib/spec_producer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d0a6951a87afcd5cddb9a36b20c6a1174af38c6
|
4
|
+
data.tar.gz: 5b714d4b2acedaf902aabc82d240057fc751f05f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d55184e57a8c084392ec28da53a09f644b43a1a902a3eec92fa6b7fbbd0153fdb805d49bab089f48a57cf94abd24c58b95550fa46f51da280194943572a69d94
|
7
|
+
data.tar.gz: 2eee575741de47e967b687086fc26138e1ed9b1531ceb405f9a382c67dc2ccda3cfd6e5554e4147b2b040021c274a203bf78acf62a38ee9d7c70386cff96a2df
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# SpecProducer
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/arcanoid/spec_producer.svg?branch=master)](https://travis-ci.org/arcanoid/spec_producer)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/spec_producer.svg)](https://badge.fury.io/rb/spec_producer)
|
5
|
+
|
3
6
|
SpecProducer is a gem that is meant to assist users in skipping the tedious work of creating spec tests for basic
|
4
7
|
functionality. It reads through the files of the project and prepares some of the basic spec tests for you.
|
5
8
|
|
data/lib/spec_producer.rb
CHANGED
@@ -111,6 +111,8 @@ module SpecProducer
|
|
111
111
|
end
|
112
112
|
|
113
113
|
nil
|
114
|
+
rescue NameError
|
115
|
+
puts "ActiveRecord is not set for this project. Skipping model specs production."
|
114
116
|
end
|
115
117
|
|
116
118
|
def self.produce_specs_for_routes
|
@@ -132,8 +134,8 @@ module SpecProducer
|
|
132
134
|
route_group[1].each do |route|
|
133
135
|
final_text << " it \"#{route[:verb].upcase} #{route[:path]} should route to '#{route[:controller]}##{route[:action]}'\" do\n"
|
134
136
|
|
135
|
-
final_text << "
|
136
|
-
final_text << "
|
137
|
+
final_text << " expect(:#{route[:verb]} => '#{route[:path].gsub(/:[a-zA-Z_]+/){ |param| param.gsub(':','').upcase }}').\n"
|
138
|
+
final_text << " to route_to(:controller => '#{route[:controller]}',\n"
|
137
139
|
|
138
140
|
/:[a-zA-Z_]+/.match(route[:path]).to_a.each do |parameter|
|
139
141
|
final_text << " #{parameter} => '#{parameter.gsub(':','').upcase}',\n"
|
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.
|
4
|
+
version: 0.5.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-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|