require "spec_helper" describe Blogit::Configuration do let(:blog_configuration) { @blog_configuration = Blogit::Configuration.new } it "should set :include_comments to true" do blog_configuration.include_comments.should be_true end it "should set :current_blogger_method to :current_user" do blog_configuration.current_blogger_method.should eql(:current_user) end it "should set :blogger_display_name_method to :username" do blog_configuration.blogger_display_name_method.should eql(:username) end it "should set :posts_per_page to 5" do blog_configuration.posts_per_page.should eql(5) end it "should set :authentication_method to :login_required" do blog_configuration.authentication_method.should == :login_required end it "should set datetime format to :short" do blog_configuration.datetime_format.should == :short end it "should set author_edits_only to false" do blog_configuration.author_edits_only.should be_false end it "should set ajax comments to true" do blog_configuration.ajax_comments.should be_true end it "should set include admin actions to true" do blog_configuration.include_admin_actions.should be_true end it "should set include admin links to true" do blog_configuration.include_admin_links.should be_true end it "should set page caching to false by default" do blog_configuration.cache_pages.should be_false end it "should set default_parser to :markdown" do blog_configuration.default_parser.should eql(:markdown) end it "should return default_parser as class with default_parser_class" do blog_configuration.default_parser = :textile blog_configuration.default_parser_class.should eql(Blogit::Parsers::TextileParser) end it "should set redcarpet default options" do blog_configuration.redcarpet_options.should == { hard_wrap: true, filter_html: true, autolink: true, no_intraemphasis: true, fenced_code_blocks: true, gh_blockcode: true } end it "should set highlight_code_syntax to true" do blog_configuration.highlight_code_syntax.should be_true end end