have_button(locator)
have_checked_field(locator)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationController < ActionController::Base | |
| # ... | |
| unless Rails.application.config.consider_all_requests_local | |
| rescue_from Exception, with: :render_500 | |
| rescue_from ActionController::RoutingError, with: :render_404 | |
| rescue_from ActionController::UnknownController, with: :render_404 | |
| rescue_from ActionController::UnknownAction, with: :render_404 | |
| rescue_from ActiveRecord::RecordNotFound, with: :render_404 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .DS_Store | |
| ._* | |
| node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Adapted from https://gist.github.com/1444494 | |
| # Things you need to do before using this lib: | |
| # require 'sinatra/flash' (gem sinatra-flash) | |
| # register Sinatra::Flash | |
| # register Sinatra::AuthInABox | |
| # enable :sessions optionally configuring your favourite sessions settings | |
| # Have a User model, which has the methods self.authenticate(user, pass) and is_admin? | |
| # In your forms (login, signup, etc) make sure you display flash[:errors] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Foo | |
| module Configuration | |
| require 'ostruct' | |
| extend ActiveSupport::Concern | |
| included do | |
| # | |
| end | |
| module ClassMethods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'koala' | |
| configure do | |
| APPLICATION_ID = "facebook_application_id" | |
| APPLICATION_SECRET = "facebook_application_secret" | |
| set :sessions, true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
| require 'rvm/capistrano' | |
| set :application, "hirefireapp" | |
| set :repository, "git@codeplane.com:meskyanichi/myapp.git" | |
| set :branch, "develop" | |
| set :rvm_ruby_string, "1.9.2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // blog post: http://blog.slashpoundbang.com/post/15096433153/css3-scss-mixins | |
| // Mixins ---------------------------------------------------------------------- | |
| // http://css3please.com/ | |
| @mixin background-rgba($red, $green, $blue, $opacity, $rgba) { | |
| background-color: transparent; | |
| background-color: rgba($red, $green, $blue, $opacity); | |
| filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$rgba}',endColorstr='#{$rgba}'); | |
| zoom: 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # test/support/custom_capybara_expectations.rb | |
| module CustomCapybaraExpectations | |
| def has_flash_message?(message) | |
| within '#flash' do | |
| has_content? message | |
| end | |
| end | |
| end | |
| Capybara::Session.send :include, CustomCapybaraExpectations | |
| CustomCapybaraExpectations.public_instance_methods(false).each do |name| |