Sha256: 7ac2f8c8e811f687973945da65faab65af2fce8d115bc2c37b23081fedfc794d

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

describe Noumenon do
  describe "managing the content repository" do
    it "can be set" do
      Noumenon.content_repository = Noumenon::Repository.new
    end

    it "can be retrieved" do
      repo = Noumenon::Repository.new
      Noumenon.content_repository = repo
      Noumenon.content_repository.should == repo
    end
  end

  describe "setting the theme" do
    context "when assigning with a Theme object" do
      it "sets the theme directly" do
        theme = Noumenon::Theme.new("/tmp")
        Noumenon.theme = theme
        Noumenon.theme.should == theme
      end
    end

    context "when assigning a theme name" do
      around do |example|
        with_temporary_theme do
          example.run
        end
      end
      
      it "sets the theme if it has been registered" do
        Noumenon::Theme.load(theme_path)

        Noumenon.theme = "Example Theme"
        Noumenon.theme.should == Noumenon::Theme.themes["Example Theme"]
      end

      it "raises an ArgumentError if it has not been registered" do

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
noumenon-0.1.1 spec/noumenon_spec.rb
noumenon-0.1.0 spec/noumenon_spec.rb