Sha256: 5cf69d1047853ef2e73f14acf6d4a1bee29d35ff001b78b4802e8855fa2666ad
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' describe "BonaFide::Configuration" do before(:all) { require 'bona_fide' } let (:config) { BonaFide::Configuration.new } it "should allow read/write of :base_class" do config.should respond_to(:base_class) config.should respond_to(:base_class=) end it "should allow read/write of :cookie_name" do config.should respond_to(:cookie_name) config.should respond_to(:cookie_name=) end it "should allow read/write of :setter" do config.should respond_to(:setter) config.should respond_to(:setter=) end it "should reset on initialize" do config.base_class.should eq(nil) config.cookie_name.should eq(nil) config.setter.should eq(nil) end describe "#call_base" do it "should respond to :call_setter" do config.should respond_to(:call_setter) end it "should call :setter on :base_class" do config.base_class = BonaFideHelper::User config.setter = :authenticate config.send(:call_setter, BonaFideHelper::User::TEST_TOKEN).should eq(true) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bona_fide-0.1.1 | spec/bona_fide/configuraton_spec.rb |
bona_fide-0.1.0 | spec/bona_fide/configuraton_spec.rb |