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 whack(objects) | |
objects.inject({}) do |results, o| | |
results[o.table_name] = o.delete_all | |
results | |
end | |
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
intervals = [] | |
time = @start_time | |
while (time < @end_time) | |
intervals << [time, time.next_interval] | |
time = time.next_interval | |
end | |
## Time ext | |
class Time |
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
describe MakesController do | |
fixtures :users | |
integrate_views | |
describe "index should be visible to" do | |
# this is a macro that just pumps out three tests: log in anonymous, log in as a user, log in as an admin | |
it_should_behave_like "check all users" | |
before 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
# http://gist.github.com/10524 | |
# Prevents autotest from running your entire test suite after fixing a failed test. | |
# Works with ZenTest 3.10.0 | |
# Place this in your .autotest file: | |
require 'rubygems' | |
require 'active_support' | |
class Autotest | |
def run_with_not_rerunning_everything | |
hook :initialize |
NewerOlder