(Here's my proposed fix for this)
First, print out the test names:
$ ruby minitest.rb -v
Run options: -v --seed 58440
# Running tests:
AnotherTest#test_something = 0.00 s = F
class Thing | |
def self.runner=(custom_runner) | |
@runner = custom_runner | |
end | |
def self.runner | |
@runner ||= new | |
end | |
def run(*args) |
describe ThingController do | |
describe "creating a thing" do | |
action { post :create, attributes } | |
describe "when not logged in" do | |
it "should redirect to login" do | |
assert_redirected_to login_path | |
end | |
end |
(Here's my proposed fix for this)
First, print out the test names:
$ ruby minitest.rb -v
Run options: -v --seed 58440
# Running tests:
AnotherTest#test_something = 0.00 s = F
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__) | |
ENV["KINTAMA_EXPLICITLY_DONT_RUN"] = "true" | |
at_exit { $reporter.show_final_results } | |
require 'kintama' | |
$contexts = [] | |
class TomReporter < Kintama::Reporter::Inline | |
def show_final_results | |
puts | |
puts test_summary |
a_really_long_method_name_with_arguments "looks weird", | |
{if: "they are indented"} | |
"like this" | |
but_a_shorter_one "doesn't look", | |
"quite as weird" | |
it_also_depends_on "how long", "the arguments", "are" | |
and_how_many_arguments( |
{"blog"=>{"Alice"=>2422, "Bob"=>2542, "Clare"=>2503, "Dave"=>2533}, | |
"invoice"=>{"Alice"=>2504, "Bob"=>2493, "Clare"=>2535, "Dave"=>2468}, | |
"fire_log"=>{"Alice"=>2488, "Bob"=>2500, "Clare"=>2479, "Dave"=>2533}} |
#!/usr/bin/env ruby | |
# You should ensure that the `rmagick` and `a2_printer` gems are installed. | |
require "rubygems" | |
require "RMagick" | |
require "a2_printer" | |
if ARGV.length < 2 | |
puts "Usage: convert_image_to_bytes.rb <image_file> <output_file>" |
This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Huge thanks to funny-falcon for the performance patches.
#!/usr/bin/env ruby | |
git_changes = `git status --porcelain | awk '{print $2}'` | |
files = [] | |
git_changes.split.each do |file| | |
if File.directory?(file) | |
files += Dir["#{file}**/*"] | |
else | |
files << file | |
end |
That Man is the product of causes which had no prevision of the end they were achieving; that his origin, his growth, his hopes and fears, his loves and his beliefs, are but the outcome of accidental collocations of atoms; that no fire, no heroism, no intensity of thought and feeling, can preserve an individual life beyond the grave; that all the labours of the ages, all the devotion, all the inspiration, all the noonday brightness of human genius, are destined to extinction in the vast death of the solar system, and that the whole temple of Man’s achievement must inevitably be buried beneath the debris of a universe in ruins—all these things, if not quite beyond dispute, are yet so nearly certain, that no philosophy which rejects them can hope to stand. Only within the scaffolding of these truths, only on the firm foundation of unyielding despair can the soul’s habitation be safely built.
-- Bertrand Russell