Skip to content

Instantly share code, notes, and snippets.

@onthespotqa
onthespotqa / cucumber
Created October 6, 2011 03:59
cucumber examples
feature:
Feature: Cucumber Question
Scenario Outline: Google Search for <search term>
Given I am on Google Search Home Page
When I search for "<Search>"
Then I should find "<Search>"
Examples:
| Search |
| Facebook |
We couldn’t find that file to show.
@onthespotqa
onthespotqa / array.rb
Created December 3, 2011 23:45
array
array = ["id", "name"]
#use the id
browser.text_field(:id, id)
#use the name
browser.text_field(:id, name)
@onthespotqa
onthespotqa / gist:1734766
Created February 4, 2012 03:04
test multiple sites with taza
require 'spec_helper'
require 'site1'
require 'site2'
describe "Site1Page" do
it "it should go from site 1 to site 2" do
Site1.new do |s|
s.site1_page.element.should exist
end
@onthespotqa
onthespotqa / mulit.yml
Created February 6, 2012 22:28
multiple environment settings site.yml for taza
---
isolation:
:url: http://defaultsite.com
:host: default
:database: default
:user: username
:password: password
dev:
:url: http://devsite.com
:host: devhost
@onthespotqa
onthespotqa / sd-ruby-demo.rb
Last active December 14, 2015 15:59
Example Watir Script, used during an sd-ruby talk.
require 'watir'
#Start the Browser
b = Watir::Browser.new
b.bring_to_front
b.maximize
#Go to the Watir Examples Form
@onthespotqa
onthespotqa / confirmations_controller.rb
Last active December 29, 2015 06:49
Devise Override code
#Confirmations Controller located in controllers/riders
class Riders::ConfirmationsController < Devise::ConfirmationsController
skip_before_filter :require_no_authentication
skip_before_filter :authenticate_user!
# PATCH /riders/confirmation
def update
with_unconfirmed_confirmable do
if @confirmable.has_no_password?
@confirmable.attempt_set_password(params[:rider])
if @confirmable.valid?