Commit e718c7b205b34b22bbd25c4bed4e731463e6a356
Removes deprecation warnings
# Link to discussion: https://github.com/rspec/rspec-expectations/issues/231 # Link to changelog: https://github.com/rspec/rspec-expectations/blob/master/Changelog.md#2140rc1--2013-05-27Bruno Henrique - Garu committed on 5/14/2014, 1:30:23 AM
Parent: f167f92c702ea6b01a9995e3089f49b95c34eecb
Files changed
spec/bcrypt/engine_spec.rb | changed |
spec/bcrypt/password_spec.rb | changed |
spec/bcrypt/engine_spec.rb | ||
---|---|---|
@@ -57,10 +57,10 @@ | ||
57 | 57 | end |
58 | 58 | |
59 | 59 | specify "should raise an InvalidSecret error if the secret is invalid" do |
60 | 60 | lambda { BCrypt::Engine.hash_secret(MyInvalidSecret.new, @salt) }.should raise_error(BCrypt::Errors::InvalidSecret) |
61 | - lambda { BCrypt::Engine.hash_secret(nil, @salt) }.should_not raise_error(BCrypt::Errors::InvalidSecret) | |
62 | - lambda { BCrypt::Engine.hash_secret(false, @salt) }.should_not raise_error(BCrypt::Errors::InvalidSecret) | |
61 | + expect { BCrypt::Engine.hash_secret(nil, @salt) }.not_to raise_error | |
62 | + expect { BCrypt::Engine.hash_secret(false, @salt) }.not_to raise_error | |
63 | 63 | end |
64 | 64 | |
65 | 65 | specify "should call #to_s on the secret and use the return value as the actual secret data" do |
66 | 66 | BCrypt::Engine.hash_secret(false, @salt).should == BCrypt::Engine.hash_secret("false", @salt) |
spec/bcrypt/password_spec.rb | ||
---|---|---|
@@ -15,11 +15,11 @@ | ||
15 | 15 | lambda { BCrypt::Password.new(@password) }.should_not raise_error |
16 | 16 | end |
17 | 17 | |
18 | 18 | specify "should behave normally if the secret is not a string" do |
19 | - lambda { BCrypt::Password.create(nil) }.should_not raise_error(BCrypt::Errors::InvalidSecret) | |
20 | - lambda { BCrypt::Password.create({:woo => "yeah"}) }.should_not raise_error(BCrypt::Errors::InvalidSecret) | |
21 | - lambda { BCrypt::Password.create(false) }.should_not raise_error(BCrypt::Errors::InvalidSecret) | |
19 | + expect { BCrypt::Password.create(nil) }.not_to raise_error | |
20 | + expect { BCrypt::Password.create({:woo => "yeah"}) }.not_to raise_error | |
21 | + expect { BCrypt::Password.create(false) }.not_to raise_error | |
22 | 22 | end |
23 | 23 | |
24 | 24 | specify "should tolerate empty string secrets" do |
25 | 25 | lambda { BCrypt::Password.create( "\n".chop ) }.should_not raise_error |
Built with git-ssb-web