Skip to content
Browse files

Syntax highlighting in README.md

  • Loading branch information...
1 parent 780217c commit dc5633eb95416d210b074840eb8d145bc7b06cca @penman penman committed
Showing with 24 additions and 20 deletions.
  1. +24 −20 README.md
View
44 README.md
@@ -23,32 +23,36 @@ Dependencies
Example
-------
- require 'testrocket'
-
- # BASIC USAGE
- # +-> { block that should succeed }
- # --> { block that should fail }
-
- +-> { Die.new(2) }
- --> { raise }
- +-> { 2 + 2 == 4 }
-
- # These two tests will deliberately fail
- +-> { raise }
- --> { true }
+```ruby
+require 'testrocket'
- # A 'pending' test
- ~-> { "this is a pending test" }
-
- # A description
- !-> { "use this for descriptive output and to separate your test parts" }
+# BASIC USAGE
+# +-> { block that should succeed }
+# --> { block that should fail }
+
++-> { Die.new(2) }
+--> { raise }
++-> { 2 + 2 == 4 }
+
+# These two tests will deliberately fail
++-> { raise }
+--> { true }
+
+# A 'pending' test
+~-> { "this is a pending test" }
+
+# A description
+!-> { "use this for descriptive output and to separate your test parts" }
+```
Other Features
--------------
By default, output is written to STDOUT (as well as returned by the test expressions themselves). You can override where test output goes like so:
- TestRocket.out = File.new('/dev/null', 'w')
+```ruby
+TestRocket.out = File.new('/dev/null', 'w')
+```
TestRocket.out also supports Logger instances.
@@ -56,4 +60,4 @@ Authors
-------
Initial concept and maintenance by Peter Cooper
-Extra concepts and code by Christoph Grabo
+Extra concepts and code by Christoph Grabo

0 comments on commit dc5633e

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