git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Tree: 007857af56030fbe4c85f43162679572662a396d

Files: 007857af56030fbe4c85f43162679572662a396d / spec / bcrypt / error_spec.rb

910 bytesRaw
1require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
2
3describe "Errors" do
4
5 shared_examples "descends from StandardError" do
6 it "can be rescued as a StandardError" do
7 described_class.should < StandardError
8 end
9 end
10
11 shared_examples "descends from BCrypt::Error" do
12 it "can be rescued as a BCrypt::Error" do
13 described_class.should < BCrypt::Error
14 end
15 end
16
17 describe BCrypt::Error do
18 include_examples "descends from StandardError"
19 end
20
21 describe BCrypt::Errors::InvalidCost do
22 include_examples "descends from BCrypt::Error"
23 end
24
25 describe BCrypt::Errors::InvalidHash do
26 include_examples "descends from BCrypt::Error"
27 end
28
29 describe BCrypt::Errors::InvalidSalt do
30 include_examples "descends from BCrypt::Error"
31 end
32
33 describe BCrypt::Errors::InvalidSecret do
34 include_examples "descends from BCrypt::Error"
35 end
36
37end
38

Built with git-ssb-web