Skip to content

Commit

Permalink
Convert to minitest/spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Rein Henrichs committed Feb 18, 2011
1 parent d74e7b0 commit 4cbb9de
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
22 changes: 22 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
GEM
remote: http://rubygems.org/
specs:
git (1.2.5)
jeweler (1.5.2)
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
minitest (2.0.2)
rake (0.8.7)
rcov (0.9.9)
yard (0.6.4)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.0.0)
jeweler (~> 1.5.2)
minitest
rcov
yard (~> 0.6.0)
18 changes: 9 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ end
Jeweler::RubygemsDotOrgTasks.new

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
Rake::TestTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.verbose = true
end

require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
Rcov::RcovTask.new do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.verbose = true
end

task :default => :test
task :default => :spec

require 'yard'
YARD::Rake::YardocTask.new
7 changes: 1 addition & 6 deletions test/helper.rb → spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'minitest/unit'
require 'minitest/autorun'

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'statsd'

class MiniTest::Unit::TestCase
end

MiniTest::Unit.autorun
7 changes: 7 additions & 0 deletions spec/statsd_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'helper'

describe "foo" do
it "should fail" do
flunk
end
end
7 changes: 0 additions & 7 deletions test/test_statsd.rb

This file was deleted.

0 comments on commit 4cbb9de

Please sign in to comment.