Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

A touch of cleanup on tests

Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
  • Loading branch information...
commit 6c503530d2e8f03ac446b95ce82ca0ab4bcbb4d1 1 parent 14f14d6
@pbhogan authored
Showing with 6 additions and 5 deletions.
  1. +4 −4 spec/scrypt/engine_spec.rb
  2. +2 −1  spec/scrypt/password_spec.rb
View
8 spec/scrypt/engine_spec.rb
@@ -7,8 +7,8 @@
end
end
-describe "Generating SCrypt salts" do
+describe "Generating SCrypt salts" do
it "should produce strings" do
SCrypt::Engine.generate_salt.should be_an_instance_of(String)
end
@@ -16,17 +16,16 @@
it "should produce random data" do
SCrypt::Engine.generate_salt.should_not equal(SCrypt::Engine.generate_salt)
end
-
end
-describe "Autodetecting of salt cost" do
+describe "Autodetecting of salt cost" do
it "should work" do
SCrypt::Engine.autodetect_cost("2a$08$c3$randomjunkgoeshere").should == "2a$08$c3$"
end
-
end
+
describe "Generating SCrypt hashes" do
class MyInvalidSecret
@@ -56,3 +55,4 @@ class MyInvalidSecret
SCrypt::Engine.hash_secret(false, @salt).should == SCrypt::Engine.hash_secret("false", @salt)
end
end
+
View
3  spec/scrypt/password_spec.rb
@@ -9,7 +9,7 @@
@password.should be_an_instance_of(SCrypt::Password)
end
- it "should return a valid bcrypt password" do
+ it "should return a valid password" do
lambda { SCrypt::Password.new(@password) }.should_not raise_error
end
@@ -60,3 +60,4 @@
(@password == "@secret").should be(false)
end
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.