Sha256: 5a5f53c0ace4ebce6ba110b66f1040977f4d0e709c80b6f6a1f4178a48f12b31

Contents?: true

Size: 773 Bytes

Versions: 19

Compression:

Stored size: 773 Bytes

Contents

require 'spec_helper'

describe Alchemy::PageLayout do
	
	context "method get_layouts" do

	  it "should generally return page_layouts, nothing else!" do
			Alchemy::PageLayout.read_layouts_file.should be_instance_of(Array)
	  end

	end

	context "with custom page layouts" do

		it "should return the users page_layouts if exists in the application" do
			@config_path = Rails.root.join("config/alchemy")
			FileUtils.mkdir_p(@config_path)
			layouts_file = File.join(@config_path, 'page_layouts.yml')
			File.open(layouts_file,'w') do |page_layouts|
				page_layouts.puts "- name: testlayout\n  elements:"
			end
			Alchemy::PageLayout.read_layouts_file.first.values.should include("testlayout")
		end

		after(:each) do
			FileUtils.rm_rf(@config_path)
		end

	end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 spec/page_layout_spec.rb
alchemy_cms-2.1.11 spec/page_layout_spec.rb
alchemy_cms-2.1.9.1 spec/page_layout_spec.rb
alchemy_cms-2.1.9 spec/page_layout_spec.rb
alchemy_cms-2.1.8.1 spec/page_layout_spec.rb
alchemy_cms-2.1.8 spec/page_layout_spec.rb
alchemy_cms-2.1.7 spec/page_layout_spec.rb
alchemy_cms-2.1.6 spec/page_layout_spec.rb
alchemy_cms-2.1.5 spec/page_layout_spec.rb
alchemy_cms-2.1.4 spec/page_layout_spec.rb
alchemy_cms-2.1.3 spec/page_layout_spec.rb
alchemy_cms-2.1.2 spec/page_layout_spec.rb
alchemy_cms-2.1.1 spec/page_layout_spec.rb
alchemy_cms-2.1 spec/page_layout_spec.rb
alchemy_cms-2.1.rc6 spec/page_layout_spec.rb
alchemy_cms-2.1.rc5 spec/page_layout_spec.rb
alchemy_cms-2.1.rc4 spec/page_layout_spec.rb
alchemy_cms-2.1.rc3 spec/page_layout_spec.rb
alchemy_cms-2.1.rc2 spec/page_layout_spec.rb