{"id":24432,"date":"2019-04-11T12:15:36","date_gmt":"2019-04-11T09:15:36","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=24432"},"modified":"2019-04-10T13:49:25","modified_gmt":"2019-04-10T10:49:25","slug":"optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/","title":{"rendered":"Optimize CI Using a Strong Testing Suite with Ruby on Rails"},"content":{"rendered":"\n<p> When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong testing suite, automating the suite with continuous integration (CI) will bring less defects in your production environments. Currently, the industry has some best practices for testing: BDD, TDD, etc. \u2013 although the question in hand \u2013 is writing tests before or after development a good approach? We\u2019re going to talk about test driven development; which goes over the methodology to&nbsp;<strong>WHY<\/strong>&nbsp;writing tests before we develop is efficient. <\/p>\n\n\n\n<p>I will also discuss some of the necessity\u2019s in Ruby on Rails for making a solid testing suite using the most popular testing framework. I will walk through testing concepts and discuss some of the tools out there, how to configure the testing suite, and give some tips on how to write tests with best practices.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is TDD?<\/h2>\n\n\n\n<p>Test driven development is the approach, first, the test is developed which validates what the code will do. Then, write and correct the failed tests before writing new code. This helps to avoid duplication of code as we write a small amount of code at a time in order to pass tests. From my experience, it is a solid approach as it gets the developer thinking about the smaller sub problems verse overthinking or building out the whole problem \u2013 then refactoring for hours.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where do we start? RSPEC!!!<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"480\" height=\"270\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2019\/04\/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f336f365a74315856575a63474351787a50792f67697068792e676966.gif\" alt=\"\" class=\"wp-image-24433\"\/><\/figure><\/div>\n\n\n\n<p>In this article, we will use&nbsp;<a href=\"http:\/\/rspec.info\/\">RSPEC<\/a>, which is a strong unit testing framework that allows us to connect other powerful tools to make our testing suite easy to write tests in.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Awesome Tools for our testing suite!<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/travisjeffery\/timecop\">Timecop<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Provides the ability for us to write tests that time \u201ctravel\u201d and \u201cfreeze\u201d for specific situations. Also provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/github.com\/DatabaseCleaner\/database_cleaner\">Database Cleaner<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Provides the ability for us to clean up our test blocks and not hold any previous data per context block \u2013 this depends on your strategy.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/github.com\/thoughtbot\/shoulda-matchers\">Shoulda Matchers<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Offers simple one-liner tests for common Rails functionality.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/github.com\/thoughtbot\/shoulda-matchers\">Factory Bot<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Provides a very useful tool to create our models and be able to have different types of traits that go with user case stories.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/github.com\/stympy\/faker\">Faker<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Provides a library that allows us the ability to have fake random types of data for our factory models, etc.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/github.com\/teamcapybara\/capybara\">Capybara<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Helps test web applications by simulating how a real user would interact with your app.<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/github.com\/pry\/pry\">Pry<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Provides us the ability to debug our tests \u2013 similar to the rails console in our testing suite.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Concepts to know!<\/h2>\n\n\n\n<p><strong>Double.<\/strong>&nbsp;A way for you to mock up model data.<\/p>\n\n\n\n<p><strong>Stubs.<\/strong>&nbsp;Mocks of data to answer to calls made during the test.<\/p>\n\n\n\n<p><strong>Factory.<\/strong>&nbsp;Mocks for developers to be able to create, build, etc. modeled data with traits in our testing suite to replace doubles.<\/p>\n\n\n\n<p><strong>Mock.<\/strong>&nbsp;Idea to recreate an object with fake data with the specification of the calls they are expected to receive.<\/p>\n\n\n\n<p><strong>Fixtures.<\/strong>&nbsp;Ability to have large files of data segmented into folders and read inside the suite with a cleaner way to read in data.<\/p>\n\n\n\n<p><strong>Describe.<\/strong>&nbsp;Main block of testing that is clear about what method is being referred to. This would be: Validations, #GET index, Callbacks, etc.<\/p>\n\n\n\n<p><strong>Context.<\/strong>&nbsp;Multiple blocks inside the describe block; although this should make your tests clear and well organized.<\/p>\n\n\n\n<p><strong>It.<\/strong>&nbsp;Block that specifically announces what the value should return and should not exceed more than 40 characters.<\/p>\n\n\n\n<p><strong>Before do.<\/strong>&nbsp;Opportunity before the blocks run to create instance variables, populate data or a specific task.<\/p>\n\n\n\n<p><strong>After do.<\/strong>&nbsp;Opportunity after the blocks run to create instance variables, populate data or a specific task.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">5 Tips<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Use let or let! Instead of adding instance variables with before do callback.<\/li><li>Keep your descriptions short.<\/li><li>Use shared examples to DRY your test suite.<\/li><li>Test what you see ONLY.<\/li><li>Do not use should when describing tests.<\/li><\/ul>\n\n\n\n<p>I would refer to&nbsp;<a href=\"http:\/\/www.betterspecs.org\/\">betterspec.org<\/a>&nbsp;for a full guide to best rspec practices.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup my RSPEC Config with \u201cAwesome Tools\u201d<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Explain Spec\/Rails<\/h3>\n\n\n\n<p><code>Spec Helper<\/code>&nbsp;is for specs which don\u2019t depend on Rails, which could be custom spec classes.&nbsp;<code>Rails Helper<\/code>&nbsp;is for specs which do depend on Rails, which would be our tools. In rspec best practices, rails_helper.rb requires spec_helper.rb.<\/p>\n\n\n\n<p>Below shows how you can begin configuring your spec files correctly using RSPEC.<\/p>\n\n\n\n<p><strong>rails_helper.rb<\/strong><\/p>\n\n\n\n<p>This file is copied to spec\/ when you run&nbsp;<code>rails generate rspec:install<\/code><\/p>\n\n\n\n<pre class=\"brush:php\">require 'spec_helper'\nENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('..\/..\/config\/environment', __FILE&lt;__)\n<\/pre>\n\n\n\n<p>\n\nPrevent database truncation if the environment is in production.\n\n<\/p>\n\n\n\n<pre class=\"brush:php\">abort(\"The Rails environment is running in production mode!\") if Rails.env.production? \nrequire 'rspec\/rails'\nbegin\n  ActiveRecord::Migration.maintain_test_schema!\nrescue ActiveRecord::PendingMigrationError =&gt; e\n  puts e.to_s.strip\n  exit 1\nend\nRSpec.configure do |config|\n<\/pre>\n\n\n\n<p>\n\nRemove this line if you\u2019re not using ActiveRecord or ActiveRecord fixtures.\n\n<\/p>\n\n\n\n<pre class=\"brush:php\">config.fixture_path = \"#{::Rails.root}\/spec\/fixtures\"\n<\/pre>\n\n\n\n<pre class=\"brush:php\">config.include Devise::Test::ControllerHelpers, type: :controller\nconfig.include Devise::Test::ControllerHelpers, type: :view\nDir[Rails.root.join('spec\/support\/**\/*.rb')].each { |f| require f }\n\nShoulda::Matchers.configure do |config|\n  config.integrate do |with|\n    with.test_framework :rspec\n    with.library :active_record\n    with.library :active_model\n    with.library :action_controller\n    with.library :rails\n  end\nend\n\nconfig.before(:suite) do\n  DatabaseCleaner.clean_with(:truncation)\nend\n\nconfig.after(:all) do\n  DatabaseCleaner.clean_with(:truncation)\nend\n\nconfig.include Rails.application.routes.url_helpers\nconfig.use_transactional_fixtures = true\nconfig.infer_spec_type_from_file_location!\nconfig.filter_rails_from_backtrace!\nend\n<\/pre>\n\n\n\n<p><strong>spec_helper.rb<\/strong><\/p>\n\n\n\n<pre class=\"brush:php\">RSpec.configure do |config|\n  config.expect_with :rspec do |expectations|\n    expectations.include_chain_clauses_in_custom_matcher_descriptions = true\n  end\n\n  config.mock_with :rspec do |mocks|\n    mocks.verify_partial_doubles = true\n  end\nend\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Once we have a strong testing suite, continuous integrations is our best friend. We can further optimize our suite by setting up hooks to automatically run our tests on pre-deploy states, automate our suite for deployments, etc.<\/p>\n\n\n\n<p>Having CI setup with a service like CodeShip will enable you to make the deployment processes less likely to have defects in your production environments enabling faster development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Additional resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>How&nbsp;<a href=\"https:\/\/blog.codeship.com\/why-saas-ci-cd-solutions-work-for-open-source-projects\/\">SaaS CI\/CD<\/a>&nbsp;can work in your environment<\/li><li>Learn how to&nbsp;<a href=\"https:\/\/blog.codeship.com\/how-to-use-rails-active-job\/\">use Rails Active Job<\/a><\/li><li>Find out about using Ruby on Rails for&nbsp;<a href=\"https:\/\/blog.codeship.com\/how-to-use-ruby-on-rails-for-local-smtp-email-testing\/\">SMTP email testing<\/a><\/li><\/ul>\n\n\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Web Code Geeks with permission by Evan Glazer, partner at our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener noreferrer\">WCG program<\/a>. See the original article here: <a href=\"https:\/\/blog.codeship.com\/optimize-ci-testing-suite-with-ruby-on-rails\/\" target=\"_blank\" rel=\"noopener noreferrer\">Optimize CI Using a Strong Testing Suite with Ruby on Rails<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong testing suite, automating the suite with continuous integration (CI) will bring less defects in your production environments. Currently, the industry has some best practices for testing: &hellip;<\/p>\n","protected":false},"author":10271,"featured_media":4127,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[95,121],"class_list":["post-24432","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby","tag-rails","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Optimize CI Using a Strong Testing Suite with Ruby on Rails - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong\" \/>\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.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Optimize CI Using a Strong Testing Suite with Ruby on Rails - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-11T09:15:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Evan Glazer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@evan_glazer\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Evan Glazer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\"},\"author\":{\"name\":\"Evan Glazer\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329\"},\"headline\":\"Optimize CI Using a Strong Testing Suite with Ruby on Rails\",\"datePublished\":\"2019-04-11T09:15:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\"},\"wordCount\":940,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"keywords\":[\"Rails\",\"Testing\"],\"articleSection\":[\"Ruby\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\",\"name\":\"Optimize CI Using a Strong Testing Suite with Ruby on Rails - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"datePublished\":\"2019-04-11T09:15:36+00:00\",\"description\":\"When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/ruby\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Optimize CI Using a Strong Testing Suite with Ruby on Rails\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329\",\"name\":\"Evan Glazer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g\",\"caption\":\"Evan Glazer\"},\"description\":\"Evan Glazer is a software engineer and self-starter at Edukate, where he uses Ember and Ruby on Rails and works with natural language processing and machine learning.\",\"sameAs\":[\"https:\/\/blog.codeship.com\",\"https:\/\/x.com\/evan_glazer\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/evan-glazer\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Optimize CI Using a Strong Testing Suite with Ruby on Rails - Web Code Geeks - 2026","description":"When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong","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.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/","og_locale":"en_US","og_type":"article","og_title":"Optimize CI Using a Strong Testing Suite with Ruby on Rails - Web Code Geeks - 2026","og_description":"When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong","og_url":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2019-04-11T09:15:36+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","type":"image\/jpeg"}],"author":"Evan Glazer","twitter_card":"summary_large_image","twitter_creator":"@evan_glazer","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Evan Glazer","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/"},"author":{"name":"Evan Glazer","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329"},"headline":"Optimize CI Using a Strong Testing Suite with Ruby on Rails","datePublished":"2019-04-11T09:15:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/"},"wordCount":940,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","keywords":["Rails","Testing"],"articleSection":["Ruby"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/","url":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/","name":"Optimize CI Using a Strong Testing Suite with Ruby on Rails - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","datePublished":"2019-04-11T09:15:36+00:00","description":"When it comes to testing suites, it\u2019s imperative to have a strong suite with all the tools to make your teams life easier. Once your team has a strong","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/04\/rubyonrails-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/ruby\/optimize-ci-using-a-strong-testing-suite-with-ruby-on-rails\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Ruby","item":"https:\/\/www.webcodegeeks.com\/category\/ruby\/"},{"@type":"ListItem","position":3,"name":"Optimize CI Using a Strong Testing Suite with Ruby on Rails"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/99389fa5af3bc43e693c41e0d63e8329","name":"Evan Glazer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d682081fa7ff1813f66b9c2d06e8476ca6f3b6956f15f8e38d6fcc6b89292fcd?s=96&d=mm&r=g","caption":"Evan Glazer"},"description":"Evan Glazer is a software engineer and self-starter at Edukate, where he uses Ember and Ruby on Rails and works with natural language processing and machine learning.","sameAs":["https:\/\/blog.codeship.com","https:\/\/x.com\/evan_glazer"],"url":"https:\/\/www.webcodegeeks.com\/author\/evan-glazer\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/24432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/10271"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=24432"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/24432\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/4127"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=24432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=24432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=24432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}