myronmarston/vcr — comment on commit e8682f8382f8e320717b917d15d280e899a4398f
File: spec/vcr/configuration_spec.rb line 225
By myronmarston:

I think that's implied by some of these other specs that demonstrates circumstances when it returns false:

``` ruby

it "returns true when the configured block returns true" do
subject.preserve_exact_body_bytes { |msg| msg.body == "a" }
subject.preserve_exact_body_bytes_for?(message_for "a").should be_true
subject.preserve_exact_body_bytes_for?(message_for "b").should be_false
end

context "default hook" do
it "returns false when there is no current cassette" do
subject.preserve_exact_body_bytes_for?(message_for "string").should be_false
end

it "returns false when the current cassette has been created without the :preserve_exact_body_bytes option" do
VCR.insert_cassette('foo')
subject.preserve_exact_body_bytes_for?(message_for "string").should be_false
end

it 'returns true when the current cassette has been created with the :preserve_exact_body_bytes option' do
VCR.insert_cassette('foo', :preserve_exact_body_bytes => true)
subject.preserve_exact_body_bytes_for?(message_for "string").should be_true
end
end
```