Use Capistrano 3 to Deploy Rails Applications - a Step-by-Step Tutorial
Aug 15, 14 by Juan Lebrijo about capistrano, deployment, ssh, thin, ruby on rails, Ubuntu, blog
Another collaboration with Tealeaf Academy was about how to use the brand new Capistrano 3 to deploy your applications; a basic guide:

Use Capistrano 3 to Deploy Rails Applications - a Step-by-Step Tutorial

Enjoy!
How to Install Ruby on Rails on Ubuntu Linux
Aug 13, 14 by Juan Lebrijo about git, linux, postgresql, rbenv, ruby on rails, rubymine, sublime, Ubuntu, blog
I am collaborating with Tealeaf Academy writting in their blog, and my first post was about how to create a Development environment in Ubuntu:

How to Install Ruby on Rails on Ubuntu Linux

Enjoy!
Smoke production tests for critical features
Aug 12, 14 by Juan Lebrijo about capybara, rspec, ruby, smoke tests, test, blog
Use case:
  • A client wants to be sure that some critical functionality is running in their production environments. Example: their products are showing in their web shop.
Plan:
  • Create some Smoke tests against production server
  • Create a Jenkins job which executes them every hour, sending a mail if this fails
In this post we will see how to create these Smoke tests with Rspec/Capybara/Mechanize. On server you can have deployed whatever web technology (Java, PHP, Node ...). Required gems:
  • Rspec: testing Ruby environment
  • Capybara: simple DSL for simulating user interaction with a web application
  • Capibara-mechanize: Capybara driver which uses mechanize to create remote server requests
So that in your Gemfile (asuming you use Bundler to manage your dependencies):
  gem 'capybara'
  gem 'capybara-mechanize'
The specification:
require 'spec_helper'

WEBSITE_URL = "http://www.swordshop.com"

feature "Critical features on: #{WEBSITE_URL}" , smoke: true do
  background do
    Capybara.run_server = false
    Capybara.app_host = WEBSITE_URL
    require 'capybara/mechanize'
    Capybara.default_driver = :mechanize

    visit root_path
  end

  scenario "root is up" do
    page.should have_content("Best Swords in the world")
  end

  scenario "products url is showing products" do
    within("nav") { click_on "Products" }
    page.should have_css(".product")
  end
end
Just a little great detail: include smoke tag in your excluding filters, so that this will not be mixed with your unit and functional tests:
  config.filter_run_excluding :smoke
And you can allways call these tests with the command:
rspec --tag smoke