This file contains 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
1 require File.dirname(__FILE__) + "/spec_helper" | |
2 | |
3 require 'email' | |
4 | |
5 describe Email do | |
6 describe '.normalize', ' should strip email down to core address' do | |
7 def self.normalized(original, options) | |
8 it %{normalizes '#{original}' as '#{options[:should_be]}'} do | |
9 Email.normalize(original).should == options[:should_be] | |
10 end |
This file contains 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
unless self.class.const_defined?('APP_ROOT') | |
APP_ROOT = File.expand_path(File.dirname(__FILE__) + '/../../../../../') | |
end | |
puts "#{File.basename(__FILE__)}: APP_ROOT: #{APP_ROOT}" | |
require File.expand_path("#{File.dirname(__FILE__)}/no_rails_env_spec_helper") | |
unless self.class.const_defined?('Rails') | |
require 'benchmark' |
This file contains 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
Daemon 0 | |
LogFacility - | |
LogLevel 5 | |
ListenHTTP | |
Address lenny.ridge | |
Port 3001 | |
Service | |
URL "/MyApp1/.*" |
This file contains 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
config.after_initialize do | |
AppConfig.payment_gateway_mode = :test | |
end |
This file contains 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
config.after_initialize do | |
MVOR::Gateway.use_3ds_test_gateway | |
end |
This file contains 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
When I select the following previous correspondence items: | |
| type | date | filename | | |
| CTA | 01Jan09 | EMAIL | | |
When /^I select the following previous correspondence items:$/ do |table| | |
checkboxes = PreviousCorrespondenceSteps.get_checkboxes_for(table) | |
checkboxes.each {|b| b.set(true) } |
This file contains 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 ExpensiveOperation | |
def self.lookup(question) | |
"This goes to the database" | |
end | |
end | |
class UsesExpensiveOperation | |
def initialize | |
@cache = {} | |
end |
This file contains 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 BackgroundJobWatcher | |
attr_accessor :mailer, :error_io | |
class << self | |
def attempt(job_name, &blk) | |
new.attempt(job_name, &blk) | |
end | |
end | |
def initialize(opts = {}) |
This file contains 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
dir = ARGV[0] | |
raise "Usage: #{$0} <DIR>" if dir.nil? | |
Dir[File.join(dir, '**/*.haml')].each do |f| | |
s = File.read(f) | |
lines = [] | |
s.each_line do |l| | |
l = l.gsub('&=', '=') |
NewerOlder