diff options
-rw-r--r-- | test/spec_session_abstract_session_hash.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/spec_session_abstract_session_hash.rb b/test/spec_session_abstract_session_hash.rb index 16b06c7b..76b34a01 100644 --- a/test/spec_session_abstract_session_hash.rb +++ b/test/spec_session_abstract_session_hash.rb @@ -37,5 +37,9 @@ describe Rack::Session::Abstract::SessionHash do it "works with a block" do assert_equal :default, hash.fetch(:unkown) { :default } end + + it "it raises when fetching unknown keys without defaults" do + lambda { hash.fetch(:unknown) }.must_raise KeyError + end end end |