Skip to content

Instantly share code, notes, and snippets.

Scenario:
Given I am on the weather page
When I enter my zipcode : 46789
Then I should see a temperature
And I should see an icon
Scenario: User signs up with valid data
When I hit the sign up api with "user@example.com/secret"
Then I should see JSON:
"{}"
Resulting error:
features/api_signup.feature:27:9: Parse error, expected one of "|", "\"\"\"", "\n", "\r", "#", "* ", "Given ", "When ", "Then ", "And ", "But ", "@", "Scenario", "Scenario Outline". (Cucumber::Parser::SyntaxError)
Scenario: User signs up with valid data
When I hit the sign up api with "user@example.com/secret"
Then I should see JSON:
"""
{"stuff":"value"}
"""
Results:
Scenario: User signs up with valid data # /Users/bmattax/Documents/workspace/donationllc/apps/donationweb/features/api_signup.feature:24
namespace :feedback do
desc "Feedback request email"
task :feedback_request => [:login, :environment] do
#... some unrelated code
begin
# opening a page using mechanize
page = open_order_contact_page(o.order_number,"FDBK")
form = page.form('comments')
form.comments = @@feedback_request_body.gsub("<order_number>",o.order_number).gsub(/(\w.{1,72})(\s+)/s, "\\1\n")
form.button_with(:name=>'sendemail').x=1
@rlmattax
rlmattax / phil.2.1-4.rb
Created November 23, 2010 16:30
Phillipians 2:1-4
def main
require 'church'
require 'christian'
# Phillipians 2:1-4
var church_body = new Church() # initialized w/ global dataset
var me = new Christian()
if (
encouragement_in_christ or
consolation_of_love or
fellowship_of_the_spirit or
* executing "cd /var/www/current && sudo -p 'sudo password: ' -u app nohup script/spin"
servers: ["184.73.245.53"]
[184.73.245.53] executing command
*** [err :: 184.73.245.53] sudo
*** [err :: 184.73.245.53] :
*** [err :: 184.73.245.53] unknown user: app
*** [err :: 184.73.245.53]
command finished
blargh
this is my config/deploy.rb
module ApplicationHelper
FLASH_TYPES = [:notice, :error ]
def flash_messages
res = ""
FLASH_TYPES.each do |type|
res += content_tag(:div, flash[type], :class=>[type,"notification", "rounded-corners"]) if flash[type]
end
raw(res)
end
end
@rlmattax
rlmattax / gist:1345791
Created November 7, 2011 18:47 — forked from datafatmunger/gist:1345641
Missile command
background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0, rgba(255,255,255,0)), color-stop(0.15, rgba(255,255,255,0.55)), color-stop(0.5, rgba(255,255,255,0))), -webkit-gradient(linear, 0 0, 0 100%, color-stop(0, #204db5), color-stop(0.1, #0251ae), color-stop(0.9, #6fc1ff), color-stop(1, #569ce1));
-webkit-mask-image: -webkit-gradient(linear, 18 0, 0 10, color-stop(0.23, rgba(0,0,0,0)), color-stop(0.3, rgba(0,0,0,0.8)), color-stop(0.4, rgba(0,0,0,1)), color-stop(0.7, rgba(0,0,0,1)), color-stop(0.7, rgba(0,0,0,0.8)), color-stop(0.77, rgba(0,0,0,0)));
-webkit-mask-repeat: repeat-x;
-webkit-mask-size: 20px 15px;
-webkit-mask-position: 0px;
class BadUsernameMailer < ActionMailer::Base
layout 'mailer'
default from: "info@uflavor.com"
def username_changed_email(user,old,new)
@old = old
@new = new
mail(:to => user.email, :subject => "uFlavor - Important Account Information - username changed")
end
end
@rlmattax
rlmattax / gist:3084374
Created July 10, 2012 16:11
.htaccess
Options -MultiViews
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
# DEFAULT APP
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?req=$1 [L,QSA]