Take the 2-minute tour ×

I'm using both rspec and cucumber. Cucumber of integration level tests, but rspec for unit tests.

I'm using vcr for cucumber already, but want to use it for rspec, too. Where's the right place to put the vcr configuration? I'd rather not replicate it in both features/support and rspec/support.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Cucumber doesn't "know" about RSpec, nor vice-versa. If you don't want to duplicate it, define it in its own file, say spec/support/vcr_setup.rb, and then include that in both.

require File.expand_path("../../../spec/support/vcr_setup", __FILE__)
(think that's right, adjust path as needed)

require "support/vcr_setup"

share|improve this answer

Your Answer


