README.markdown in citrusbyte-contest-0.0.4 vs README.markdown in citrusbyte-contest-0.0.5
- old
+ new
@@ -11,11 +11,11 @@
Usage
-----
Declare your tests as you would in RSpec or Shoulda. The keywords here
-are `setup`, `context` and `test`:
+are `setup`, `context` and `test`, :
require 'contest'
class SomeTest < Test::Unit::TestCase
setup do
@@ -41,9 +41,27 @@
end
test "yet more tests" do
assert_equal 3, @value
end
+ end
+ end
+ end
+
+For your convenience, `context` is aliased as `describe` and `test` is aliased as `should`, so this is valid:
+
+ class SomeTest < Test::Unit::TestCase
+ setup do
+ @value = 1
+ end
+
+ describe "something" do
+ setup do
+ @value += 1
+ end
+
+ should "equal 2" do
+ assert_equal 2, @value
end
end
end
You can run it normaly, it's Test::Unit after all. If you want to run a particular test, say "yet more tests", try this: