Skip to content

Instantly share code, notes, and snippets.

View futhr's full-sized avatar
:octocat:

Tobias Bohwalli futhr

:octocat:
View GitHub Profile
@futhr
futhr / capybara.rb
Last active April 21, 2016 19:14 — forked from afn/gist:c04ccfe71d648763b306
Restart and retry when Poltergeist fails randomly.
# Borrowed from https://github.com/y310/rspec-retry/blob/master/lib/rspec/retry.rb
# Drop this script into spec/support
# To test snippet just set timeout to 1
RSpec.configure do |config|
Capybara.javascript_driver = :poltergeist
Capybara.register_driver(:poltergeist) do |app|
Capybara::Poltergeist::Driver.new app,
@futhr
futhr / capybara_cheat_sheet.rb
Last active December 20, 2015 14:29 — forked from ootoovak/capybara cheat sheet.rb
Collection of Capybara >= 2.1 stuff for feature specs.
# Navigating
visit '/projects'
visit post_comments_path(@post)
# Clicking links and buttons
click_link 'id_of_link'
click_link 'Link Text'
click_button 'Save'
# updated from the original @ http://cheat.errtheblog.com/s/rspec_shoulda
# just a subset -- models -- is included here. I'll update this, and create cheat sheets for others, as I go along.
# I marked the ones I added with NEW and also added the links to the corresponding code, as I think it's useful.
# Any comments/corrections are welcome!
# ================= Data and Associations =======================
# https://github.com/thoughtbot/shoulda-matchers/tree/master/lib/shoulda/matchers/active_record
it { is_expected.not_to have_db_column(:admin).of_type(:boolean) }
it { is_expected.to have_db_column(:salary).
@futhr
futhr / TechDecisions.md
Last active October 4, 2015 12:58 — forked from hardbap/TechDecisions.md
Choices to make in a new Rails project.

Team Support

Source Code Control

Github
Alternative: Bitbucket, git (private server)

Time Tracking

None