Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove ShamRack.unmount.

Use ShamRack.at(...).unmount instead.
  • Loading branch information...
commit a1cfe72d277e09101bdef6a72685794a59aebcd0 1 parent afbf6b7
@mdub authored
Showing with 15 additions and 19 deletions.
  1. +0 −4 lib/sham_rack/registration.rb
  2. +15 −15 spec/sham_rack_spec.rb
View
4 lib/sham_rack/registration.rb
@@ -25,10 +25,6 @@ def mount(app, address, port = nil)
at(address, port).mount(app)
end
- def unmount(address, port = nil)
- at(address, port).unmount
- end
-
private
def mount_point_for(address, port)
View
30 spec/sham_rack_spec.rb
@@ -80,21 +80,6 @@ class NetHttpProhibited < StandardError; end
end
- describe ".unmount" do
-
- it "deregisters a mounted app" do
-
- ShamRack.mount(GreetingApp.new, "gone.xyz")
- ShamRack.unmount("gone.xyz")
-
- lambda do
- open("http://gone.xyz").read
- end.should raise_error(NetHttpProhibited)
-
- end
-
- end
-
describe ".at" do
describe "with a block" do
@@ -123,6 +108,21 @@ class NetHttpProhibited < StandardError; end
end
+ describe "#unmount" do
+
+ it "deregisters a mounted app" do
+
+ ShamRack.at("gone.xyz").mount(GreetingApp.new)
+ ShamRack.at("gone.xyz").unmount
+
+ lambda do
+ open("http://gone.xyz").read
+ end.should raise_error(NetHttpProhibited)
+
+ end
+
+ end
+
describe "#rackup" do
before do
Please sign in to comment.
Something went wrong with that request. Please try again.