Sha256: 0859245e224bde6e07399780727c6174b322aae40bd8236b9a6ab15368606903

Contents?: true

Size: 1.1 KB

Versions: 7

Compression:

Stored size: 1.1 KB

Contents

require File.expand_path('../test_helper', File.dirname(__FILE__))

class ConfigurationTest < ActiveSupport::TestCase
  
  def test_configuration
    assert config = ComfyBlog.configuration
    assert_equal 'ComfyBlog',               config.title
    assert_equal 'A Simple Blog',           config.description
    assert_equal 'admin',                   config.admin_route_prefix
    assert_equal '',                        config.public_route_prefix
    assert_equal 'ApplicationController',   config.admin_controller
    assert_equal 'ComfyBlog::FormBuilder',  config.form_builder
    assert_equal 10,                        config.posts_per_page
    assert_equal false,                     config.auto_publish_comments
    assert_equal nil,                       config.disqus_shortname
  end
  
  def test_initialization_overrides
    ComfyBlog.config.admin_route_prefix = 'new-admin'
    assert_equal 'new-admin', ComfyBlog.config.admin_route_prefix
  end
  
  def test_disqus_enabled?
    assert !ComfyBlog.disqus_enabled?
    ComfyBlog.config.disqus_shortname = 'test'
    assert ComfyBlog.disqus_enabled?
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
comfy_blog-0.1.8 test/unit/configuration_test.rb
comfy_blog-0.1.7 test/unit/configuration_test.rb
comfy_blog-0.1.6 test/unit/configuration_test.rb
comfy_blog-0.1.5 test/unit/configuration_test.rb
comfy_blog-0.1.4 test/unit/configuration_test.rb
comfy_blog-0.1.3 test/unit/configuration_test.rb
comfy_blog-0.1.2 test/unit/configuration_test.rb