Skip to content

Commit c6a0c9d

Browse files
author
Jesús Burgos
committed
Updated settings for RSpec and VCR.
1 parent 3b97399 commit c6a0c9d

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
--require spec_helper
12
--format documentation
23
--color

spec/spec_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
21
require 'dropbox_api_v2'
32
require 'support/vcr'
43

spec/support/vcr.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@
44
config.cassette_library_dir = "spec/fixtures/vcr_cassettes"
55
config.hook_into :webmock # or :fakeweb
66
end
7+
8+
RSpec.configure do |c|
9+
c.around(:each) do |example|
10+
if example.metadata[:cassette].nil?
11+
example.run
12+
else
13+
VCR.use_cassette(example.metadata[:cassette]) { example.run }
14+
end
15+
end
16+
end

0 commit comments

Comments
 (0)