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
--- star_wars_original_cast_list.txt 2010-09-23 16:55:05.880472400 +1200 | |
+++ star_wars_actual_cast_list.txt 2010-09-23 16:55:08.513527400 +1200 | |
@@ -8,10 +8,10 @@ | |
Cast (in credits order) verified as complete | |
Mark Hamill Luke Skywalker | |
-Al Pacino Han Solo | |
+Harrison Ford Han Solo |
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
def record_and_send(object, method, args, &block) | |
begin | |
result = object.send("__unlogged_#{method}", *args, &block) | |
ensure | |
@calls << { :object => object, :method => method, :args => args.clone, :result => result } | |
end | |
result | |
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
require 'rake' | |
desc 'Generates github-styled html from a markdown file and writes it to stdout' | |
task :preview_github_readme, :file do |_, args| | |
fail("Missing file argument") if args.file.nil? | |
fail("Missing file #{args.file}") unless File.exists?(args.file) | |
puts inject_github to_html(args.file) | |
end | |
def inject_github(html_text) |
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
--- the_matrix_original_cast_list.txt 2010-10-18 10:05:35.734461800 +1300 | |
+++ the_matrix_actual_cast_list.txt 2010-10-18 10:05:38.670519100 +1300 | |
@@ -1,22 +1,22 @@ | |
The Matrix (1999) | |
Directed by | |
Andy Wachowski (as The Wachowski Brothers) | |
Lana Wachowski (as The Wachowski Brothers) | |
Writing credits |
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
gzip -dc $(man -w grep) | man2html > man/grep.html |
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
require 'rake' | |
InstallDir = 'C:/Program Files/Oracle/VirtualBox' | |
VBoxManage = File.join(InstallDir, '/VBoxManage.exe') | |
VBoxHeadless = File.join(InstallDir, '/VBoxHeadless.exe') | |
task :default do; puts %x{rake -f #{__FILE__} -sT}; end | |
desc "Print help" | |
task :help do | |
vbox_manage 'help' |
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
require 'rake' | |
require 'spec' | |
describe 'About rake tasks, arguments and ENV' do | |
before(:each) do | |
ENV.delete('any_environment_variable') | |
Rake::Task.clear | |
end | |
it 'Argument may be satisfied from the ENV array if there is none explicitly supplied when invoked' do |
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
<html> | |
<head></head> | |
<body> | |
<a href="http://www.buzzhunt.co.uk/2009/05/13/gym-ball-bounce-flip/"><img src="http://www.buzzhunt.co.uk/wp-content/2009/05/flip.gif" /></a> | |
</body> | |
</html> |
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
module AcceptanceTest | |
def self.included(in_what) | |
in_what.class_eval do | |
before(:all) do | |
@something_heavy = Object.new | |
end | |
after(:all) do | |
@something_heavy.delete? if @something_heavy | |
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
# spec_helper.rb | |
RSpec.configure do |config| | |
if ENV["RSPEC_WATCH_ME"] | |
config.after(:suite) do | |
time_formatter = Class.new(Object) do | |
include RSpec::Core::Formatters::Helpers | |
end.new | |
log_file = File.join Rails.root, 'log', "rspec-test-runs-#{Date.today.to_s}.txt" |
OlderNewer