14
.
11
.
2023
11
.
02
.
2016
Ruby on Rails

Running RSpec tests before deploying with Capistrano v3

Sakir Temel
ex-CTO

Running RSpec tests before deploying with Capistrano v3

For small projects which do not have CI integration, RSpec tests can be run just before deployment. So you will be always sure that you are not deploying bad code at any time.

Add this code in your deploy.rb file.

before :starting, :run_tests do
  puts 'Running tests before deploy'

  unless system 'rspec'
    puts 'Tests are failed deployment is being aborted'

    exit;
  end
end

Referenced [https://jasonparraga.com/running-a-minitest-test-suite-before-deploying-with-capistrano/]

Sakir Temel
ex-CTO

Check my Twitter

Check my Linkedin

Did you like it? 

Sign up To VIsuality newsletter

READ ALSO

Table partitioning in Rails, part 1 - Postgres Stories

11
.
06
.
2025
Jarosław Kowalewski
Postgresql
Backend
Ruby on Rails

Indexing partitioned table - Postgres Stories

11
.
06
.
2025
Jarosław Kowalewski
Backend
Postgresql

Table partitioning types - Postgres Stories

11
.
06
.
2025
Jarosław Kowalewski
Postgresql
Backend
SQL Views in Ruby on Rails

SQL views in Ruby on Rails

11
.
06
.
2025
Jan Grela
Backend
Ruby
Ruby on Rails
Postgresql
Design your bathroom in React

Design your bathroom in React

11
.
06
.
2025
Bartosz Bazański
Frontend
React
Lazy Attributes in Ruby - Krzysztof Wawer

Lazy attributes in Ruby

11
.
06
.
2025
Krzysztof Wawer
Ruby
Software

Exporting CSV files using COPY - Postgres Stories

11
.
06
.
2025
Jarosław Kowalewski
Postgresql
Ruby
Ruby on Rails
Michał Łęcicki - From Celluloid to Concurrent Ruby

From Celluloid to Concurrent Ruby: Practical Examples Of Multithreading Calls

11
.
06
.
2025
Michał Łęcicki
Backend
Ruby
Ruby on Rails
Software

Super Slide Me - Game Written in React

11
.
06
.
2025
Antoni Smoliński
Frontend
React
Jarek Kowalewski - ILIKE vs LIKE/LOWER - Postgres Stories

ILIKE vs LIKE/LOWER - Postgres Stories

11
.
06
.
2025
Jarosław Kowalewski
Ruby
Ruby on Rails
Postgresql

A look back at Friendly.rb 2023

11
.
06
.
2025
Cezary Kłos
Conferences
Ruby

Debugging Rails - Ruby Junior Chronicles

11
.
06
.
2025
Piotr Witek
Ruby on Rails
Backend
Tutorial

GraphQL in Ruby on Rails: How to Extend Connections

11
.
06
.
2025
Cezary Kłos
Ruby on Rails
GraphQL
Backend
Tutorial

Tetris on Rails

11
.
06
.
2025
Paweł Strzałkowski
Ruby on Rails
Backend
Frontend
Hotwire

EURUKO 2023 - here's what you've missed

11
.
06
.
2025
Michał Łęcicki
Ruby
Conferences

Easy introduction to Connection Pool in ruby

11
.
06
.
2025
Michał Łęcicki
Ruby on Rails
Backend
Ruby
Tutorial

When crazy ideas bring great time or how we organized our first Conference!

11
.
06
.
2025
Alexander Repnikov
Ruby on Rails
Conferences
Visuality

Stacey Matrix & Takeaways - why does your IT project suck?

11
.
06
.
2025
Wiktor De Witte
Project Management
Business

A simple guide to pessimistic locking in Rails

11
.
06
.
2025
Michał Łęcicki
Ruby on Rails
Backend
Ruby
Tutorial

Poltrax design - story of POLTRAX (part 3)

11
.
06
.
2025
Mateusz Wodyk
Startups
Business
Design

Writing Chrome Extensions Is (probably) Easier Than You Think

11
.
06
.
2025
Antoni Smoliński
Tutorial
Frontend
Backend

Bounded Context - DDD in Ruby on Rails

11
.
06
.
2025
Paweł Strzałkowski
Ruby on Rails
Domain-Driven Design
Backend
Tutorial

The origin of Poltrax development - story of POLTRAX (part 2)

11
.
06
.
2025
Stanisław Zawadzki
Ruby on Rails
Startups
Business
Backend