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
| Name: Performance#description should replace an obscene description with an innocent one | |
| Type: Failure Message: | |
| expected: "Me performing care bear on my teddy", | |
| got: "Me performing cunillingus on my teddy" | |
| Name: Performance#title should replace an obscene title with an innocent one | |
| Type: Failure Message: | |
| expected: "care bear", | |
| got: "fingerfuckers" | |
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 ActiveRecordValidationMatcher | |
| class RequireA | |
| def initialize(expected) | |
| @expected = expected | |
| end | |
| def matches?(target) | |
| @target = target | |
| @target.send("#{@expected}=", nil) | |
| @target.valid? |
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 ActiveRecordAssociationMatcher | |
| class AbstractAssociationMatcher | |
| def initialize(expected) | |
| @expected = expected | |
| @expected_options = {} | |
| end | |
| def matches?(target) | |
| @target = target | |
| begin |
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
| # Released under WTFPL - http://sam.zoy.org/wtfpl/ | |
| module PoorMansMigrations | |
| @@_migration_columns = [] | |
| def column(name, type, options = {}) | |
| @@_migration_columns << {:column_name => name, :column_type => type, :options => options} | |
| end | |
| def realize!(force_drop = false) | |
| # Force drop if needed |
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
| #### | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| function proml { | |
| local BLUE="\[\033[0;34m\]" | |
| local RED="\[\033[0;31m\]" | |
| local LIGHT_RED="\[\033[1;31m\]" |
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
| # Taken directly from rails docs | |
| class MyMailer | |
| include ActionController::UrlWriter | |
| default_url_options[:host] = 'www.basecamphq.com' | |
| def signup_url(token) | |
| url_for(:controller => 'signup', action => 'index', :token => token) | |
| end | |
| end |
NewerOlder