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!
Another collaboration with Tealeaf Academy was about how to use the brand new Capistrano 3 to deploy your applications; a basic guide:
Enjoy!
I am collaborating with Tealeaf Academy writting in their blog, and my first post was about how to create a Development environment in Ubuntu:
Enjoy!
Use case:
Plan:
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:
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 |