diff --git a/spec/addressabler_spec.rb b/spec/addressabler_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/addressabler_spec.rb
+++ b/spec/addressabler_spec.rb
@@ -26,6 +26,17 @@ describe Addressabler do
       uri = Addressable::URI.parse("http://www.bart-blabla.cc")
       uri.tld.should == 'cc'
     end
+
+    it "doesn't know non-existing TLDs" do
+      uri = Addressable::URI.parse("http://www.bart-blabla.foobar")
+      uri.tld.should == ''
+    end
+
+    it "accepts custom TLDs" do
+      Addressable::URI.custom_tlds = { 'foobar' => {} }
+      uri = Addressable::URI.parse("http://www.bart-blabla.foobar")
+      uri.tld.should == 'foobar'
+    end
   end
 
   it "should support adding keys to the query" do
Write behavior for "custom_tlds" option