myronmarston/vcr — Issue #116: Using RSpec metadata with nested 'describes' loses cassette config.
Author: pauljamesrussell
Created: 2011-12-15 00:05:32+00:00
State: open

Using version 2.0.0.rc1, with RSpec 2 metadata, using nested describe blocks, I'd expect cassette configuration to be inherited down the blocks, just like the enablement of VCR itself.

Example to show you what I mean:

describe '#self.synchronize', :vcr => { :cassette_name => 'mail_chimp', :record => :new_episodes } do
describe "general behaviour" do
# Would expect cassette config to inherit to here, but instead 'general behaviour' has its own cassette.
end
describe "outbound" do
# Would expect cassette config to inherit to here, but instead 'outbound' has its own cassette.
end
end
end

Apologies if this is intended behaviour - just feels a bit wrong to me. Workaround is obviously simple: Duplicate the cassette config at each layer, but this just feels like a DRY violation to me.

Thanks.