generator_spec 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/README.md +3 -2
- data/Rakefile +5 -0
- data/lib/generator_spec/test_case.rb +0 -1
- data/lib/generator_spec/version.rb +1 -1
- data/spec/generator_spec/matcher_spec.rb +7 -4
- data/spec/generator_spec/test_case_spec.rb +3 -3
- data/spec/support/test_generator/test_generator.rb +1 -0
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -18,8 +18,9 @@ Spec:
|
|
18
18
|
|
19
19
|
describe TestGenerator do
|
20
20
|
include GeneratorSpec::TestCase
|
21
|
-
|
22
21
|
destination File.expand_path("../../tmp", __FILE__)
|
22
|
+
tests TestGenerator
|
23
|
+
arguments %w(something)
|
23
24
|
|
24
25
|
before(:all) do
|
25
26
|
prepare_destination
|
@@ -35,7 +36,7 @@ An RSpec file matching DSL is also provided, taken with permission from [beard](
|
|
35
36
|
|
36
37
|
describe TestGenerator, "using custom matcher" do
|
37
38
|
include GeneratorSpec::TestCase
|
38
|
-
|
39
|
+
tests TestGenerator
|
39
40
|
destination File.expand_path("../../tmp", __FILE__)
|
40
41
|
|
41
42
|
before do
|
data/Rakefile
CHANGED
@@ -2,9 +2,10 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe TestGenerator, "using custom matcher" do
|
4
4
|
include GeneratorSpec::TestCase
|
5
|
-
|
5
|
+
tests TestGenerator
|
6
6
|
destination File.expand_path("../../tmp", __FILE__)
|
7
|
-
|
7
|
+
arguments %w(test)
|
8
|
+
|
8
9
|
before do
|
9
10
|
prepare_destination
|
10
11
|
run_generator
|
@@ -250,6 +251,8 @@ module GeneratorSpec::Matcher
|
|
250
251
|
end
|
251
252
|
|
252
253
|
describe Root do
|
254
|
+
include FakeFS::SpecHelpers
|
255
|
+
|
253
256
|
describe "#matches?" do
|
254
257
|
before do
|
255
258
|
@root = Root.new "test" do
|
@@ -257,12 +260,12 @@ module GeneratorSpec::Matcher
|
|
257
260
|
end
|
258
261
|
end
|
259
262
|
|
260
|
-
it "returns
|
263
|
+
it "returns true on no failures" do
|
261
264
|
write_directory(TMP_ROOT.join("test/test_dir"))
|
262
265
|
@root.matches?(TMP_ROOT).should be_true
|
263
266
|
end
|
264
267
|
|
265
|
-
it "returns
|
268
|
+
it "returns false on failures" do
|
266
269
|
@root.matches?(TMP_ROOT).should be_false
|
267
270
|
end
|
268
271
|
end
|
@@ -7,7 +7,6 @@ end
|
|
7
7
|
describe GeneratorSpec::TestCase do
|
8
8
|
before do
|
9
9
|
@klass = Class.new do
|
10
|
-
self.should_receive(:subject).and_return(Proc.new {TestClass.new})
|
11
10
|
include GeneratorSpec::TestCase
|
12
11
|
end
|
13
12
|
@klass.test_case_instance = mock
|
@@ -26,9 +25,10 @@ end
|
|
26
25
|
|
27
26
|
describe TestGenerator, "using normal assert methods" do
|
28
27
|
include GeneratorSpec::TestCase
|
29
|
-
|
28
|
+
tests TestGenerator
|
30
29
|
destination File.expand_path("../../tmp", __FILE__)
|
31
|
-
|
30
|
+
arguments %w(test)
|
31
|
+
|
32
32
|
before(:all) do
|
33
33
|
prepare_destination
|
34
34
|
run_generator
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: generator_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.8.
|
5
|
+
version: 0.8.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Steve Hodgkiss
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-06 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|