Sha256: db957340e8bd5f8912cef1a397f17b30fd5408f58ab835e330302953642fc218
Contents?: true
Size: 903 Bytes
Versions: 3
Compression:
Stored size: 903 Bytes
Contents
require "spec_helper" describe SimpleAuth::Config do it "should yield SimpleAuth::Config class" do SimpleAuth.setup do |config| config.should == SimpleAuth::Config end end context "injecting behavior" do it "should not respond to helper methods" do Account.should_not respond_to(:authenticate) end end it "should use [:email, :login] as credential attributes" do SimpleAuth::Config.credentials.should == [:email, :login] end it "should use User as default model" do SimpleAuth::Config.model.should == :user end specify "crypter should expect 2 block arguments" do SimpleAuth::Config.crypter.arity.should == 2 end specify "salt should expect 1 block argument" do SimpleAuth::Config.salt.arity.should == 1 end specify "salt should return a 64-char long salt" do SimpleAuth::Config.salt.call(nil).size.should == 64 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_auth-1.1.0 | spec/simple_auth/config_spec.rb |
simple_auth-1.0.2 | spec/simple_auth/config_spec.rb |
simple_auth-1.0.1 | spec/simple_auth/config_spec.rb |