Permalink
Browse files

A touch of cleanup on tests

Signed-off-by: Patrick Hogan <pbhogan@gmail.com>
  • Loading branch information...
1 parent 14f14d6 commit 6c503530d2e8f03ac446b95ce82ca0ab4bcbb4d1 @pbhogan committed Apr 11, 2012
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,26 +7,25 @@
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
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
+

0 comments on commit 6c50353

Please sign in to comment.