{"id":1522,"date":"2017-08-19T11:21:48","date_gmt":"2017-08-19T11:21:48","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=1522"},"modified":"2020-12-08T12:49:29","modified_gmt":"2020-12-08T07:19:29","slug":"super-fast-vcr-configuration-for-rspec-and-minitest","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/","title":{"rendered":"Super Fast VCR Configuration for RSpec and MiniTest"},"content":{"rendered":"\n<p>You determined to use VCR by reading following from the README:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Record your test suite&#8217;s HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.<\/p><\/blockquote>\n\n\n\n<p>But the README of <a href=\"https:\/\/github.com\/vcr\/vcr\" target=\"_blank\" rel=\"noopener noreferrer\">VCR gem<\/a> has a little clutter and the configuration mentioned there shows few deprecation warning when we run the spec.<\/p>\n\n\n\n<p>Here is a configuration which will work best for most of the cases with RSpec (and also with minitest).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure following gems in Gemfile and bundle<\/h3>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/AmitPatel-BoTreeConsulting\/b62551b484c0d079957f02c2d4275a15.js\"><\/script><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create following file as mentioned in the comment&nbsp;below<\/h3>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/AmitPatel-BoTreeConsulting\/b222f33260498c3d72bc8e35b2f48368.js\"><\/script><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Modify rails_helper.rb\/spec_helper.rb to add following line at the&nbsp;top<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>require 'support \/ vcr_setup'<\/code><\/p><\/blockquote>\n\n\n\n<p>You can now use it in your spec. I strongly recommend to <a href=\"http:\/\/railscasts.com\/episodes\/291-testing-with-vcr\" target=\"_blank\" rel=\"noopener noreferrer\" data-href=\"http:\/\/railscasts.com\/episodes\/291-testing-with-vcr\">Ryan Bates Video<\/a> to get to know how VCR works.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\"><strong><b>Click here for more<\/b> details&#8230;<\/strong><\/a><\/p>\n\n\n\n<p>At<a href=\"https:\/\/www.botreetechnologies.com\/\"> BoTree Technologies<\/a>, we build enterprise applications with our RoR team of 25+ engineers.<\/p>\n\n\n\n<p>We also specialize in Python, RPA, AI, Django, JavaScript and ReactJS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.botreetechnologies.com\/contact\">Consulting is free<\/a> &#8211; let us help you grow!<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>You determined to use VCR by reading following from the&#8230;<\/p>\n","protected":false},"author":3,"featured_media":13843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-1522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Super Fast VCR Configuration for RSpec and MiniTest<\/title>\n<meta name=\"description\" content=\"Learn More about How Can We Do Super fast VCR configuration for RSpec and MiniTest. To Get More about RSpec and MiniTest Contact Us Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Super Fast VCR Configuration for RSpec and MiniTest\" \/>\n<meta property=\"og:description\" content=\"Learn More about How Can We Do Super fast VCR configuration for RSpec and MiniTest. To Get More about RSpec and MiniTest Contact Us Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-19T11:21:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-08T07:19:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Amit Patel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amit Patel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\"},\"author\":{\"name\":\"Amit Patel\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46\"},\"headline\":\"Super Fast VCR Configuration for RSpec and MiniTest\",\"datePublished\":\"2017-08-19T11:21:48+00:00\",\"dateModified\":\"2020-12-08T07:19:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\"},\"wordCount\":173,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\",\"name\":\"Super Fast VCR Configuration for RSpec and MiniTest\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg\",\"datePublished\":\"2017-08-19T11:21:48+00:00\",\"dateModified\":\"2020-12-08T07:19:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46\"},\"description\":\"Learn More about How Can We Do Super fast VCR configuration for RSpec and MiniTest. To Get More about RSpec and MiniTest Contact Us Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg\",\"width\":1920,\"height\":1280,\"caption\":\"RSpec and MiniTest\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Super Fast VCR Configuration for RSpec and MiniTest\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46\",\"name\":\"Amit Patel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png\",\"caption\":\"Amit Patel\"},\"description\":\"Amit is the COO and Co-founder of BoTree Technologies. He is a developer advocate and solution architect at the company. He has helped many SME and Large corporations digitize their business operations. He loves hanging out with friends and meditate.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Super Fast VCR Configuration for RSpec and MiniTest","description":"Learn More about How Can We Do Super fast VCR configuration for RSpec and MiniTest. To Get More about RSpec and MiniTest Contact Us Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/","og_locale":"en_US","og_type":"article","og_title":"Super Fast VCR Configuration for RSpec and MiniTest","og_description":"Learn More about How Can We Do Super fast VCR configuration for RSpec and MiniTest. To Get More about RSpec and MiniTest Contact Us Now!","og_url":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2017-08-19T11:21:48+00:00","article_modified_time":"2020-12-08T07:19:29+00:00","og_image":[{"width":1920,"height":1280,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg","type":"image\/jpeg"}],"author":"Amit Patel","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Amit Patel","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/"},"author":{"name":"Amit Patel","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46"},"headline":"Super Fast VCR Configuration for RSpec and MiniTest","datePublished":"2017-08-19T11:21:48+00:00","dateModified":"2020-12-08T07:19:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/"},"wordCount":173,"commentCount":0,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/","url":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/","name":"Super Fast VCR Configuration for RSpec and MiniTest","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg","datePublished":"2017-08-19T11:21:48+00:00","dateModified":"2020-12-08T07:19:29+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46"},"description":"Learn More about How Can We Do Super fast VCR configuration for RSpec and MiniTest. To Get More about RSpec and MiniTest Contact Us Now!","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/08\/rspec-and-minitest.jpg","width":1920,"height":1280,"caption":"RSpec and MiniTest"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/super-fast-vcr-configuration-for-rspec-and-minitest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Super Fast VCR Configuration for RSpec and MiniTest"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46","name":"Amit Patel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png","caption":"Amit Patel"},"description":"Amit is the COO and Co-founder of BoTree Technologies. He is a developer advocate and solution architect at the company. He has helped many SME and Large corporations digitize their business operations. He loves hanging out with friends and meditate."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=1522"}],"version-history":[{"count":1,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1522\/revisions"}],"predecessor-version":[{"id":13844,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1522\/revisions\/13844"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13843"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=1522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=1522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=1522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}