README.markdown in sham_rack-1.3.0 vs README.markdown in sham_rack-1.3.1
- old
+ new
@@ -58,16 +58,15 @@
ShamRack.mount(my_google_stub, "google.com")
### General-purpose stubbing
@stub_app = ShamRack.at("stubbed.com").stub
-
- open("http://stubbed.com/greeting").read #=> OpenURI::HTTPError: 404
-
@stub_app.register_resource("/greeting", "Hello, world!", "text/plain")
-
+
open("http://stubbed.com/greeting").read #=> "Hello, world!"
@stub_app.last_request.path #=> "/greeting"
+
+Or, just use Sinatra, as described above ... it's almost as succinct, and heaps more powerful.
What's the catch?
-----------------
* Your Rack request-handling code runs in the same Ruby VM, in fact the same Thread, as your request.