Skip to content

Instantly share code, notes, and snippets.

View piousbox's full-sized avatar

Victor Pudeyev piousbox

View GitHub Profile
def a b
result = []
b.map do |c|
if c.class.name == 'Array'
result += a(c)
else
result.push c
end
end
=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')
@piousbox
piousbox / gist:3097520
Created July 12, 2012 11:15
An example gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'rack', '1.3.3'
# datastore
gem 'mysql2'
gem "mongoid"
gem "bson_ext"