Sha256: 92eff3277e9ad2ee9490c258c237f1d4d402c29e091075249e3c50cb2f2eb2bc

Contents?: true

Size: 918 Bytes

Versions: 3

Compression:

Stored size: 918 Bytes

Contents

require "helper"

MinitestVcr::Spec.configure!

describe MinitestVcr::Spec, :vcr => {:tag => :some_tag, :match_requests_on => [:method, :uri, :body]} do
  before do
    conn = Faraday.new
    @response = conn.get "http://example.com"
  end

  it "top level example" do
    VCR.current_cassette.name.must_equal "MinitestVcr::Spec/top level example"
  end

  describe "nested describe" do
    it "example in nested describe" do
      VCR.current_cassette.name.must_equal "MinitestVcr::Spec/nested describe/example in nested describe"
    end
  end

end


describe "top level describe", :vcr do    
  describe "an inner describe" do
    it "a test inside inner describe" do
      conn = Faraday.new
      @response = conn.get "http://example.com"

      VCR.current_cassette.name.must_equal "top level describe/an inner describe/a test inside inner describe"
    end
  end

  it "makes a request succesfully" do
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
minitest-vcr-1.4.0 test/minitest-vcr/nested_describe_test.rb
minitest-vcr-1.3.0 test/minitest-vcr/nested_describe_test.rb
minitest-vcr-1.2.2 test/minitest-vcr/nested_describe_test.rb