Skip to content

Instantly share code, notes, and snippets.

View tuomasj's full-sized avatar

Tuomas Jomppanen tuomasj

View GitHub Profile
@tuomasj
tuomasj / activation_email_spec.rb
Created November 21, 2013 15:49
Testing Activation Emails with Capybara, RSpec and Custom Matcher. I wrote blog post which is here: http://tuom.as/2013/11/20/testing-activation-emails-with-capybara-rspec-and-custom-matcher.html
require 'spec_helper'
describe "Activation Email" do
it "confirms the email when user clicks the confirmation link on activation email" do
register_new_user("john.smith@example.com", "adobe password", "adobe password")
activation_token = User.last.activation_code
expect( open_last_email.body).to have_link_with_endswith(activation_token)
visit activation_path(activation_token)
expect(page).to have_content( "Your email has been confirmed.")
end
@tuomasj
tuomasj / ruby_on_rails.yml
Created May 6, 2022 09:15
Github Actions for CI -- Ruby on Rails, PostgreSQL, Redis, Elasticsearch in May 2022
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres
ports: ['5432:5432']
env: