minitest-vcr 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/minitest-vcr/spec.rb +3 -0
- data/lib/minitest-vcr/version.rb +1 -1
- data/minitest-vcr.gemspec +1 -0
- data/test/.DS_Store +0 -0
- data/test/minitest-vcr/.DS_Store +0 -0
- metadata +21 -1
data/lib/minitest-vcr/spec.rb
CHANGED
@@ -1,17 +1,20 @@
|
|
1
1
|
require "vcr"
|
2
2
|
require "minispec-metadata"
|
3
3
|
require "extensions/string"
|
4
|
+
require "database_cleaner"
|
4
5
|
|
5
6
|
module MinitestVcr
|
6
7
|
module Spec
|
7
8
|
|
8
9
|
def self.configure!
|
9
10
|
run_before = lambda do |example|
|
11
|
+
DatabaseCleaner.start rescue DatabaseCleaner::NoORMDetected
|
10
12
|
VCR.insert_cassette example.class.name.vcr_path(example, spec_name) if metadata[:vcr]
|
11
13
|
end
|
12
14
|
|
13
15
|
run_after = lambda do |example|
|
14
16
|
::VCR.eject_cassette if metadata[:vcr]
|
17
|
+
DatabaseCleaner.clean rescue DatabaseCleaner::NoORMDetected
|
15
18
|
end
|
16
19
|
|
17
20
|
::MiniTest::Spec.before :each, &run_before
|
data/lib/minitest-vcr/version.rb
CHANGED
data/minitest-vcr.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency "vcr", "~> 2.8.0"
|
22
22
|
spec.add_runtime_dependency "minitest", ">= 4.7.5"
|
23
23
|
spec.add_runtime_dependency "minispec-metadata", "~> 2.0.0"
|
24
|
+
spec.add_runtime_dependency "database_cleaner", ">= 1.0.1"
|
24
25
|
|
25
26
|
spec.add_development_dependency "bundler", "~> 1.5"
|
26
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/test/.DS_Store
ADDED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: minitest-vcr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0
|
5
|
+
version: 0.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Mike Piccolo
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
version: 2.0.0
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: database_cleaner
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.0.1
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.0.1
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
62
78
|
- !ruby/object:Gem::Dependency
|
63
79
|
name: bundler
|
64
80
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -270,10 +286,12 @@ files:
|
|
270
286
|
- lib/minitest-vcr/spec.rb
|
271
287
|
- lib/minitest-vcr/version.rb
|
272
288
|
- minitest-vcr.gemspec
|
289
|
+
- test/.DS_Store
|
273
290
|
- test/cassettes/MinitestVcr_Spec/a_describe_with_metadata/with_a_nested_example_group/uses_a_cassette_for_any_examples.yml
|
274
291
|
- test/cassettes/MinitestVcr_Spec/an_it_with_metadata/with_a_nested_example_group/uses_a_cassette_for_any_examples.yml
|
275
292
|
- test/extensions/string_test.rb
|
276
293
|
- test/helper.rb
|
294
|
+
- test/minitest-vcr/.DS_Store
|
277
295
|
- test/minitest-vcr/spec_test.rb
|
278
296
|
homepage: ''
|
279
297
|
licenses:
|
@@ -301,9 +319,11 @@ signing_key:
|
|
301
319
|
specification_version: 3
|
302
320
|
summary: Allows VCR to automatically make cassetes with proper file paths with MiniTest
|
303
321
|
test_files:
|
322
|
+
- test/.DS_Store
|
304
323
|
- test/cassettes/MinitestVcr_Spec/a_describe_with_metadata/with_a_nested_example_group/uses_a_cassette_for_any_examples.yml
|
305
324
|
- test/cassettes/MinitestVcr_Spec/an_it_with_metadata/with_a_nested_example_group/uses_a_cassette_for_any_examples.yml
|
306
325
|
- test/extensions/string_test.rb
|
307
326
|
- test/helper.rb
|
327
|
+
- test/minitest-vcr/.DS_Store
|
308
328
|
- test/minitest-vcr/spec_test.rb
|
309
329
|
has_rdoc:
|