{"id":175,"date":"2017-09-20T10:49:52","date_gmt":"2017-09-20T04:49:52","guid":{"rendered":"https:\/\/intentwise.com\/blog\/?p=175"},"modified":"2023-08-24T03:17:22","modified_gmt":"2023-08-24T11:17:22","slug":"behaviour-driven-testing-with-rails","status":"publish","type":"post","link":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/","title":{"rendered":"Behaviour Driven Development and Testing in Rails","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Testing is an important aspect of software development. One of the approaches followed by many developers is <a href=\"https:\/\/en.wikipedia.org\/wiki\/Test-driven_development#:~:text=Test%2Ddriven%20development%20(TDD),so%20that%20the%20tests%20pass.\"><strong>Test-driven development <\/strong>(TDD)<\/a>. It\u2019s the approach where you start with a test and build your code accordingly while improving your test coverage.<\/p>\n<p>Whether you use TDD or not, almost all good developers agree that writing automated tests is and should be an important process of software development. Ruby on Rails has many testing frameworks which help to write automated tests. RSpec, Capybara, Cucumber are some of the frameworks that we personally would like to talk about and explore.<\/p>\n<p><strong>RSpec&nbsp;:<\/strong><\/p>\n<p>RSpec is one of the frameworks that assist you in using the BDD approach. Some of the key syntax used within RSpec are:<\/p>\n<p><strong><em>Describe<\/em><\/strong>: Describe is a keyword used to describe a collection of tests known as Example&nbsp;Group.<\/p>\n<p><strong><em>It<\/em><\/strong>: It is a keyword used to describe an Example or test, it accepts class name and string arguments.<\/p>\n<p><strong><em>Expect<\/em><\/strong>: Expect is a keyword used to define an expectation, expectation means to check whether a certain condition is met.<\/p>\n<p>Setting up RSpec would need the following approach.<\/p>\n<ol>\n<li>Add <strong><em>gem \u201crspec-rails\u201d <\/em><\/strong>in your gem file and bundle&nbsp;install.<\/li>\n<li>Write your&nbsp;specs.<\/li>\n<\/ol>\n<figure><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-1241\" src=\"https:\/\/intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/Rails-RSpec-Gem.png\" alt=\"Rails RSpec Gem\" width=\"900\" height=\"210\"><\/figure>\n<p>3. The command to execute your specs is <strong><em>rspec<\/em><\/strong> or you can execute it through your&nbsp;IDE.<\/p>\n<p>4. If you have to just test a single line say line 28 you can do something like this, rspec&nbsp;.\/spec\/features\/user_registers_spec.rb:28<\/p>\n<figure><img decoding=\"async\" class=\"aligncenter size-full wp-image-1240 lazyload\" data-src=\"https:\/\/intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/Rails-Cucumber.png\" alt=\"Rails RSpec\" width=\"900\" height=\"210\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 900px; --smush-placeholder-aspect-ratio: 900\/210;\"><\/figure>\n<p><strong>Capybara<\/strong>&nbsp;:<\/p>\n<p>Capybara is an integration testing tool for ruby on rails, Capybara is built on webrat. Capybara integrates easily with RSpec.<\/p>\n<p>Capybara Installation&nbsp;:<\/p>\n<p>Add <strong><em>gem<\/em><\/strong> <strong><em>capybara<\/em><\/strong> in your gem file and bundle&nbsp;install<\/p>\n<p>some of DSL of capybara looks like this.<\/p>\n<blockquote><p>visit(\u2018url\u2019)<\/p><\/blockquote>\n<blockquote><p>fill_in \u201cEmail\u201d<\/p><\/blockquote>\n<blockquote><p>find(\u2018path\u2019).click<\/p><\/blockquote>\n<blockquote><p>click_button(\u2018button\u2019)<\/p><\/blockquote>\n<p><strong>CUCUMBER<\/strong>&nbsp;:<\/p>\n<p>Cucumber is divided into 3 parts.<\/p>\n<ol>\n<li>Feature<\/li>\n<li>Scenarios<\/li>\n<li>Steps<\/li>\n<\/ol>\n<p>The feature is divided into scenarios and scenarios is further divided into steps<\/p>\n<ol>\n<li><strong><em>Feature:<\/em><\/strong> Feature is a use case that describes a specific function of the software being tested.<\/li>\n<li><strong><em>Scenarios:<\/em><\/strong> A single scenario is a flow of events through the feature with executable test cases for the system.<\/li>\n<li><strong><em>Steps:<\/em><\/strong> A sequence of steps forms a scenario there are some of the keywords they are, Given, where, then, and, but.<\/li>\n<\/ol>\n<p><strong>Cucumber installation&nbsp;:<\/strong><\/p>\n<p>Add the gem to your gem file as follows and do a bundle&nbsp;install<\/p>\n<blockquote><p>group&nbsp;:test&nbsp;do<\/p><\/blockquote>\n<blockquote><p>gem \u2018cucumber-rails\u2019,&nbsp;:require =&gt;&nbsp;false<\/p><\/blockquote>\n<blockquote><p>#database_cleaner is not required, but highly recommended<\/p><\/blockquote>\n<blockquote><p>gem \u2018database_cleaner\u2019<\/p><\/blockquote>\n<blockquote><p>end<\/p><\/blockquote>\n<p>To execute it you can run command <strong><em>rails generate cucumber: install<\/em><\/strong><\/p>\n<p>Running cucumber with&nbsp;Rake:<\/p>\n<blockquote><p><strong><em>rake cucumber<\/em><\/strong><\/p><\/blockquote>\n<p>Running cucumber without&nbsp;rake:<\/p>\n<blockquote><p><strong><em>[bundle exec]&nbsp;cucumber<\/em><\/strong><\/p><\/blockquote>\n<figure><img decoding=\"async\" class=\"aligncenter size-full wp-image-1242 lazyload\" data-src=\"https:\/\/intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/Rails-RSpec.png\" alt=\"Rails Cucumber\" width=\"700\" height=\"300\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 700px; --smush-placeholder-aspect-ratio: 700\/300;\"><\/figure>\n<p><strong>Create:<\/strong> Create a keyword that is used to create a new user with the given credentials.<\/p>\n<p><strong>Visit:<\/strong> After creating a new user you should be able to see the login page for which the path is mentioned using visit&nbsp;keyword.<\/p>\n<p><strong>Login: <\/strong>when you are in the login page you need to login in order to go inside the app for which you need to provide the login details which is email and password as shown in the screenshot.<\/p>\n<p><strong>Expect: <\/strong>once you are inside the app you are expected to see certain things that are mentioned. Since this is a test done for \u201cunconfirmed user\u201d you are expected to see contents like \u201cyou have to confirm your email address before continuing\u201d.<\/p>\n<blockquote><p><strong>Difference between RSpec, Capybara and Cucumber:<\/strong><\/p><\/blockquote>\n<p><strong>Rspec<\/strong>: RSpec is a framework that helps us to write unit tests, functional tests, and integration tests. These tests try to send requests to your rails application, but don\u2019t actually run the application end-to-end.<\/p>\n<p><strong>Capybara<\/strong>: Capybara is a web driver that powers the cucumber integration testing framework that uses a WebKit without UI. This allows running tests in browser for automated testing. This is helpful in both development and testing.<\/p>\n<p><strong>Cucumber<\/strong>: Cucumber is an integration testing framework, it uses plain English like syntax to write the tests which allow writing automated tests. Cucumber follows a Behavior Driven Development model which describes what a web application should do in plain English.<\/p>\n<p><em>Read our post &#8220;<a href=\"https:\/\/www.intentwise.com\/blog\/technology\/rails-authentication-frameworks\/\">Rails Authentication Frameworks<\/a>&#8221; for a short analysis of the various Ruby on Rails authentication frameworks including Cancan, Auth-logic, Devise, etc.<\/em><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>Testing is an important aspect of software development. One of the approaches followed by many developers is Test-driven development (TDD). It\u2019s the approach where you start with a test and build your code accordingly while improving your test coverage. Whether you use TDD or not, almost all good developers agree that writing automated tests is [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":4,"featured_media":22868,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","cybocfi_hide_featured_image":"yes","footnotes":""},"categories":[10],"tags":[9],"class_list":["post-175","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-cloud-data-infrastructure"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.7 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Behaviour Driven Development and Testing in Rails<\/title>\n<meta name=\"description\" content=\"Explore Ruby on Rails testing frameworks RSpec, Capybara, &amp; Cucumber used for writing automated tests &amp; enable Test-driven development(TDD).\" \/>\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.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Behaviour Driven Development and Testing in Rails\" \/>\n<meta property=\"og:description\" content=\"Explore Ruby on Rails testing frameworks RSpec, Capybara, &amp; Cucumber used for writing automated tests &amp; enable Test-driven development(TDD).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/\" \/>\n<meta property=\"og:site_name\" content=\"Intentwise Blog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ragskashyap\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-20T04:49:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-24T11:17:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/IW-Featured-Images-21.png\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Raghu Kashyap\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ragskashyap\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raghu Kashyap\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/\"},\"author\":{\"name\":\"Raghu Kashyap\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#\\\/schema\\\/person\\\/2ee23f4b06970f050e08dc0add723572\"},\"headline\":\"Behaviour Driven Development and Testing in Rails\",\"datePublished\":\"2017-09-20T04:49:52+00:00\",\"dateModified\":\"2023-08-24T11:17:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/\"},\"wordCount\":713,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/IW-Featured-Images-21.png\",\"keywords\":[\"Cloud Data Infrastructure\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/\",\"url\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/\",\"name\":\"Behaviour Driven Development and Testing in Rails\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/IW-Featured-Images-21.png\",\"datePublished\":\"2017-09-20T04:49:52+00:00\",\"dateModified\":\"2023-08-24T11:17:22+00:00\",\"description\":\"Explore Ruby on Rails testing frameworks RSpec, Capybara, & Cucumber used for writing automated tests & enable Test-driven development(TDD).\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/technology\\\/behaviour-driven-testing-with-rails\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/.\\\/technology\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Behaviour Driven Development and Testing in Rails\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/\",\"name\":\"Intentwise Blog\",\"description\":\"Amazon Analytics &amp; Advertising Software\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#organization\",\"name\":\"Intentwise\",\"url\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/favicon256.png\",\"contentUrl\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/favicon256.png\",\"width\":256,\"height\":256,\"caption\":\"Intentwise\"},\"image\":{\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/#\\\/schema\\\/person\\\/2ee23f4b06970f050e08dc0add723572\",\"name\":\"Raghu Kashyap\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/a\\\/ACg8ocKsh7N3FROrYn40qt13SBywMxAdYxWpCZiEEhbZxcVS5sy0rFSw\",\"url\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/a\\\/ACg8ocKsh7N3FROrYn40qt13SBywMxAdYxWpCZiEEhbZxcVS5sy0rFSw\",\"contentUrl\":\"https:\\\/\\\/lh3.googleusercontent.com\\\/a\\\/ACg8ocKsh7N3FROrYn40qt13SBywMxAdYxWpCZiEEhbZxcVS5sy0rFSw\",\"caption\":\"Raghu Kashyap\"},\"description\":\"I help Advertisers on Marketplaces such as Amazon, Walmart, Way-fair, Overstock, and Instacart leverage the Intentwise technology platform to scale better. Additionally, I oversee our product development, Customer Success, and Marketing initiatives.\",\"sameAs\":[\"https:\\\/\\\/kashyaps.com\",\"https:\\\/\\\/www.facebook.com\\\/ragskashyap\",\"https:\\\/\\\/www.instagram.com\\\/ragskashyap\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/raghukashyap\\\/\",\"https:\\\/\\\/x.com\\\/ragskashyap\"],\"honorificPrefix\":\"Mr\",\"gender\":\"male\",\"knowsAbout\":[\"advertising\",\"marketing\",\"Data platform\",\"technology\"],\"knowsLanguage\":[\"English\",\"Kannada\",\"Tamil\",\"Telugu\",\"Hindi\"],\"jobTitle\":\"CTO, Founder\",\"worksFor\":\"Intentwise\",\"url\":\"https:\\\/\\\/www.intentwise.com\\\/blog\\\/author\\\/raghukashyap\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Behaviour Driven Development and Testing in Rails","description":"Explore Ruby on Rails testing frameworks RSpec, Capybara, & Cucumber used for writing automated tests & enable Test-driven development(TDD).","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.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/","og_locale":"en_US","og_type":"article","og_title":"Behaviour Driven Development and Testing in Rails","og_description":"Explore Ruby on Rails testing frameworks RSpec, Capybara, & Cucumber used for writing automated tests & enable Test-driven development(TDD).","og_url":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/","og_site_name":"Intentwise Blog","article_author":"https:\/\/www.facebook.com\/ragskashyap","article_published_time":"2017-09-20T04:49:52+00:00","article_modified_time":"2023-08-24T11:17:22+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/IW-Featured-Images-21.png","type":"image\/png"}],"author":"Raghu Kashyap","twitter_card":"summary_large_image","twitter_creator":"@ragskashyap","twitter_misc":{"Written by":"Raghu Kashyap","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#article","isPartOf":{"@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/"},"author":{"name":"Raghu Kashyap","@id":"https:\/\/www.intentwise.com\/blog\/#\/schema\/person\/2ee23f4b06970f050e08dc0add723572"},"headline":"Behaviour Driven Development and Testing in Rails","datePublished":"2017-09-20T04:49:52+00:00","dateModified":"2023-08-24T11:17:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/"},"wordCount":713,"commentCount":0,"publisher":{"@id":"https:\/\/www.intentwise.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/www.intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/IW-Featured-Images-21.png","keywords":["Cloud Data Infrastructure"],"articleSection":["Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/","url":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/","name":"Behaviour Driven Development and Testing in Rails","isPartOf":{"@id":"https:\/\/www.intentwise.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#primaryimage"},"image":{"@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/www.intentwise.com\/blog\/wp-content\/uploads\/2017\/09\/IW-Featured-Images-21.png","datePublished":"2017-09-20T04:49:52+00:00","dateModified":"2023-08-24T11:17:22+00:00","description":"Explore Ruby on Rails testing frameworks RSpec, Capybara, & Cucumber used for writing automated tests & enable Test-driven development(TDD).","breadcrumb":{"@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.intentwise.com\/blog\/technology\/behaviour-driven-testing-with-rails\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Technology","item":"https:\/\/www.intentwise.com\/blog\/.\/technology\/"},{"@type":"ListItem","position":2,"name":"Behaviour Driven Development and Testing in Rails"}]},{"@type":"WebSite","@id":"https:\/\/www.intentwise.com\/blog\/#website","url":"https:\/\/www.intentwise.com\/blog\/","name":"Intentwise Blog","description":"Amazon Analytics &amp; Advertising Software","publisher":{"@id":"https:\/\/www.intentwise.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.intentwise.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.intentwise.com\/blog\/#organization","name":"Intentwise","url":"https:\/\/www.intentwise.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.intentwise.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.intentwise.com\/blog\/wp-content\/uploads\/2021\/07\/favicon256.png","contentUrl":"https:\/\/www.intentwise.com\/blog\/wp-content\/uploads\/2021\/07\/favicon256.png","width":256,"height":256,"caption":"Intentwise"},"image":{"@id":"https:\/\/www.intentwise.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.intentwise.com\/blog\/#\/schema\/person\/2ee23f4b06970f050e08dc0add723572","name":"Raghu Kashyap","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKsh7N3FROrYn40qt13SBywMxAdYxWpCZiEEhbZxcVS5sy0rFSw","url":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKsh7N3FROrYn40qt13SBywMxAdYxWpCZiEEhbZxcVS5sy0rFSw","contentUrl":"https:\/\/lh3.googleusercontent.com\/a\/ACg8ocKsh7N3FROrYn40qt13SBywMxAdYxWpCZiEEhbZxcVS5sy0rFSw","caption":"Raghu Kashyap"},"description":"I help Advertisers on Marketplaces such as Amazon, Walmart, Way-fair, Overstock, and Instacart leverage the Intentwise technology platform to scale better. Additionally, I oversee our product development, Customer Success, and Marketing initiatives.","sameAs":["https:\/\/kashyaps.com","https:\/\/www.facebook.com\/ragskashyap","https:\/\/www.instagram.com\/ragskashyap\/","https:\/\/www.linkedin.com\/in\/raghukashyap\/","https:\/\/x.com\/ragskashyap"],"honorificPrefix":"Mr","gender":"male","knowsAbout":["advertising","marketing","Data platform","technology"],"knowsLanguage":["English","Kannada","Tamil","Telugu","Hindi"],"jobTitle":"CTO, Founder","worksFor":"Intentwise","url":"https:\/\/www.intentwise.com\/blog\/author\/raghukashyap\/"}]}},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/posts\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":0,"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/media\/22868"}],"wp:attachment":[{"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intentwise.com\/blog\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}