Skip to content

Instantly share code, notes, and snippets.

View akampjes's full-sized avatar

Andrew Kampjes akampjes

View GitHub Profile

Context and Describe

We tend to use describe() for things and context() for context

RSpec book

Describe

  • wrap a set of tests 'against one functionality'
@akampjes
akampjes / gist:1771103f818cc0ae041e
Last active April 29, 2016 02:29
Mechanize Cheatsheet
# Cheatsheet for using mechanize
require 'mechanize'
# Initialize Mechanize Agent
agent = Mechanize.new
agent.get 'http://localhost:3000/'
# Click on a link displayed on the page
agent.page.link_with(text: "Sign in").click