Skip to content
Browse files

Tightening things up, minor doc edits

  • Loading branch information...
1 parent 22d1003 commit 780217c89b5cb24f8ccb73add93bcda1f62aa339 @peterc committed
Showing with 20 additions and 29 deletions.
  1. +1 −1 LICENSE
  2. +5 −10 README.md
  3. +3 −7 Rakefile
  4. +8 −8 lib/testrocket.rb
  5. +1 −1 test/test_testrocket.rb
  6. +2 −2 testrocket.gemspec
View
2 LICENSE
@@ -1,6 +1,6 @@
This is a modified MIT license.
-Copyright © 2011 Peter Cooper (http://peterc.org/)
+Copyright © 2011-2012 Peter Cooper (http://peterc.org/)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub-license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
View
15 README.md
@@ -6,30 +6,26 @@
Testrocket is a super simple (as simple as it gets really) testing library for Ruby.
-It was initially developed for [this CodeBrawl competition](http://codebrawl.com/articles/contest-rundown-ruby-testing-libraries) and it won! People then asked me to release it 'for real' so here we are.
+It was initially developed for [a CodeBrawl contest](http://codebrawl.com/articles/contest-rundown-ruby-testing-libraries) and it won! People asked me to release it 'for real' so here we are.
To install:
gem install testrocket
As yet there are no useful bits and pieces for creating test files (look at the example, it's easy!) or Rake tasks. But it's all crazy simple. A few things may be added later on.
-
+
Dependencies
------------
- Ruby 1.9
-- minitest/spec (part of MRI 1.9 stdlib)
-- Unix/Unix-like/POSIX system
+- minitest (part of MRI 1.9 stdlib)
Example
-------
require 'testrocket'
- # ===========================================================
- # EXAMPLE TEST "SUITE" FOR "DIE"
- #
- # USAGE
+ # BASIC USAGE
# +-> { block that should succeed }
# --> { block that should fail }
@@ -60,5 +56,4 @@ Authors
-------
Initial concept and maintenance by Peter Cooper
-
-Extra concepts and code by Christoph Grabo
+Extra concepts and code by Christoph Grabo
View
10 Rakefile
@@ -1,11 +1,7 @@
require 'bundler'
-Bundler::GemHelper.install_tasks
-
require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
-end
+
+Bundler::GemHelper.install_tasks
+Rake::TestTask.new
task :default => :test
View
16 lib/testrocket.rb
@@ -1,18 +1,18 @@
module TestRocket
extend Module.new { attr_accessor :out }
- def _test(a, b); send((call rescue()) ? a : b); end
+ def _test(a, b); send((call rescue()) ? a : b) end
def +@; _show _test :_pass, :_fail end
def -@; _show _test :_fail, :_pass end
- def ~@; _show _pend; end
- def !@; _show _desc; end
+ def ~@; _show _pend end
+ def !@; _show _desc end
- def _show(r); (TestRocket.out || $>) << r; r end
- def _pass; " OK\n"; end
- def _fail; " FAIL @ #{source_location * ':'}\n"; end
- def _pend; "PENDING '#{call}' @ #{source_location * ':'}\n"; end
- def _desc; " FIRE '#{call}'!\n"; end
+ def _show(r); (TestRocket.out || $>) << r + "\n"; r end
+ def _pass; " OK" end
+ def _fail; " FAIL @ #{source_location * ':'}" end
+ def _pend; "PENDING '#{call}' @ #{source_location * ':'}" end
+ def _desc; " FIRE '#{call}'!" end
end
Proc.send :include, TestRocket
View
2 test/test_testrocket.rb
@@ -1,4 +1,4 @@
-require 'helper'
+require_relative 'helper'
describe TestRocket do
it "should find emptiness non-truthful by default" do
View
4 testrocket.gemspec
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
s.authors = ["Peter Cooper","Christoph Grabo"]
s.email = ["git@peterc.org","chris@dinarrr.com"]
s.homepage = "http://github.com/peterc/testrocket"
- s.summary = %q{A super lightweight testing library for Ruby}
- s.description = %q{A super lightweight testing library for Ruby}
+ s.summary = %q{A super lightweight conceptual testing library for Ruby}
+ s.description = %q{A super lightweight conceptual testing library for Ruby}
s.rubyforge_project = "testrocket"

0 comments on commit 780217c

Please sign in to comment.
Something went wrong with that request. Please try again.