README.rdoc in test-belt-1.1.0 vs README.rdoc in test-belt-1.1.1
- old
+ new
@@ -38,48 +38,38 @@
just write Test::Unit tests with assertions
=== Leftright
https://github.com/jordi/leftright
-=== Shoulda
-https://github.com/thoughtbot/shoulda
+=== Inheritence based contexts
+* naming
+* subjects
+* callbacks (test, case, and suite)
-=== Shoulda enhancements
-I've added some handy macros and extensions to some things Shoulda does. None of these are required so just use them as you see fit. Here's a sampling of what is added:
-* Class interface macros:
- * should_have_class_methods
- * should_have_readers
- * etc
-* Files macros:
- * should_have_files
- * should_have_directories
- * etc
-* Context macros:
- * before/after aliases for setup/teardown
- * etc
+=== Custom matchers for repeatable macro-tests
+* have_class_methods
+* have_instance_methods
+* have_readers
+* have_writers
+* have_accessors
+* have_files
+* base class for writing your own
-=== Additional Test::Unit context callbacks
-I've added some contexts callbacks in addition to the setup/teardown callbacks Shoulda provides:
-* setup_once / before_once - runs one time before any of the tests in the test case are run
-* teardown_once / after_once - runs one time after all of the tests in the test case are run
-* suite_started / on_suite_started - runs one time before any of the tests across the entire test suite are run
-* suite_finished / on_suite_finished - runs one time after all of the tests across the entire test suite are run
-
=== Test::Unit 'skip' directive
Test::Unit already provides a 'flunk' directive that will fail the current test. I've added a 'skip' directive that will skip the test when running the suite. I use it to ignore certain tests while I focus on others. Skipping while using LeftRight allows me to ignore the test but not forget about it when looking at my test results.
class TestCaseTest < Test::Unit::TestCase
+ include TestBelt
- context "Something" do
- should "be something awesome" do
- skip
- # anything after the 'skip' directive will not be executed
- # => use skip(false) to not halt execution
- assert something_is_in_fact_awesome
- end
- end
+ context "Something"
+ should "be something awesome" do
+ skip
+ # anything after the 'skip' directive will not be executed
+ # => use skip(false) to not halt execution
+ assert something_is_in_fact_awesome
+ end
end
== Generated Rake tasks
=== For running tests
TestBelt can provide an automatic set of rake tasks for testing subsets of your code base. These tasks are defined based on the structure of your test files. To use this first add this to your Rakefile:
@@ -100,10 +90,10 @@
=> TestBelt
>
== License
-Copyright (c) 2010 Kelly D. Redding
+Copyright (c) 2010-2011 Kelly D. Redding
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,