Skip to content

Instantly share code, notes, and snippets.

=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
Ians-MacBook-Air-2:bloccit imason$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
@iancmason
iancmason / Ruby Notes
Last active August 29, 2015 14:02
Ruby Notes
#Ruby Notes
string interpolation - insert num into string
like - num = 1
p "1 + #{num}"
Not '1 + #{num' #Ruby doesn't read single quotes for string interpolation
staying dry = do not repeat yourself
use underscores to demarcate, in place of commas for large numbers such as 1_000_000