generator_spec 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/generator_spec/matcher.rb +2 -0
- data/lib/generator_spec/version.rb +1 -1
- data/spec/generator_spec/matcher_spec.rb +13 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5f55ee0550c4513b26c1c9f37887564dc0742a9
|
4
|
+
data.tar.gz: 1941a360c254f91d1334bb029400577a4105d431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c987a55fd84da2dd427184688e3acc495dfe0d356e6e796ddfbb6c9c9511daa2b4e33cb56b07edef3042de01516575b6ccdf4ed3a7a788e8ccc133ea7abf2545
|
7
|
+
data.tar.gz: e6d89ce7a9f778c785152e067d6e0d1ed3f726612c8deaa2971caa1768082ec6a8961cbc9b9946ff0207c32a2995d52dcc69c6c275a26eb93b8ec64b7ab204a6
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Spec (files in `spec/lib/generators` are recognized as generator type example gr
|
|
19
19
|
|
20
20
|
require "generator_spec"
|
21
21
|
|
22
|
-
describe TestGenerator do
|
22
|
+
describe TestGenerator, type: :generator do
|
23
23
|
destination File.expand_path("../../tmp", __FILE__)
|
24
24
|
arguments %w(something)
|
25
25
|
|
@@ -46,7 +46,7 @@ describe TestGenerator, "using custom matcher", type: :generator do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
specify do
|
49
|
-
destination_root.
|
49
|
+
expect(destination_root).to have_structure {
|
50
50
|
no_file "test.rb"
|
51
51
|
directory "config" do
|
52
52
|
directory "initializers" do
|
@@ -44,7 +44,19 @@ describe TestGenerator, 'using custom matcher' do
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
}
|
47
|
-
}.to raise_error
|
47
|
+
}.to raise_error RSpec::Expectations::ExpectationNotMetError
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'fails when it doesnt match with do/end instead of {}' do
|
51
|
+
expect {
|
52
|
+
expect(destination_root).to have_structure do
|
53
|
+
directory 'db' do
|
54
|
+
directory 'migrate' do
|
55
|
+
no_file '123_create_tests.rb'
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
}.to raise_error RuntimeError, /You must pass a block/
|
48
60
|
end
|
49
61
|
end
|
50
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: generator_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Hodgkiss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project: generator_spec
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.6.11
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Test Rails generators with RSpec
|
@@ -117,4 +117,3 @@ test_files:
|
|
117
117
|
- spec/support/test_generator/templates/initializer.rb
|
118
118
|
- spec/support/test_generator/templates/migration.rb
|
119
119
|
- spec/support/test_generator/test_generator.rb
|
120
|
-
has_rdoc:
|