Sha256: 83118d4fa217b395beeda040642fdcae09d99629b4e3aea4410dc0454c5ade05
Contents?: true
Size: 1.24 KB
Versions: 19
Compression:
Stored size: 1.24 KB
Contents
require "spec_helper" describe ModsDisplay::Configuration::Base do it "should set config options w/ a block" do config = ModsDisplay::Configuration::Base.new do label_class "testing_label_class" value_class "testing_value_class" end config.label_class.should == "testing_label_class" config.value_class.should == "testing_value_class" end describe "link" do it "should return an array with a method name and params" do ModsDisplay::Configuration::Base.new do link :my_url_generating_method, q: '"%value%"' end.link.should == [:my_url_generating_method, {:q => '"%value%"'}] end end describe "delmiter" do it "should override the default delimiter" do ModsDisplay::Configuration::Base.new do delimiter "<br/>" end.delimiter.should == "<br/>" end it "should default to ', '" do ModsDisplay::Configuration::Base.new.delimiter.should == ", " end end describe "ignore" do it "should be set to true if the #ignore! method is called" do ModsDisplay::Configuration::Base.new do ignore! end.ignore?.should be_true end it "should be false by default" do ModsDisplay::Configuration::Base.new.ignore?.should be_false end end end
Version data entries
19 entries across 19 versions & 1 rubygems