Skip to content

Instantly share code, notes, and snippets.

@blowmage
Created August 23, 2011 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blowmage/1164256 to your computer and use it in GitHub Desktop.
Save blowmage/1164256 to your computer and use it in GitHub Desktop.
Flog Example
module Hello
def self.speak
"Hello world!"
end
end
# Note we are requiring Flog before any other rake task
# This fails with "uninitialized constant Rake::TaskLib"
require "flog_task"
FlogTask.new do |t|
t.verbose = true
end
# If we require this before flog_task then it will load fine
require "rake/testtask"
Rake::TestTask.new do |t|
t.libs << "lib" << "test"
t.pattern = "test/**/test_*.rb"
t.verbose = true
end
require "test/unit"
require "hello"
class TestHello < Test::Unit::TestCase
def test_can_speak
assert_equal "Hello world!", Hello.speak
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment