Sha256: 32378b8c0b275b22b4044c5877d15d3615c49767970446a2dfda45dc443fdf77

Contents?: true

Size: 666 Bytes

Versions: 13

Compression:

Stored size: 666 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.get_layouts.should be_instance_of(Array)
	  end

		it "should return the users page_layouts if exists in the application" do
			config_path = FileUtils.mkdir_p("#{Rails.root}/config/alchemy")
			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.get_layouts.first.values.should include("testlayout")
			FileUtils.rm_rf(config_path)
		end
	end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
alchemy_cms-2.0.7 spec/page_layout_spec.rb
alchemy_cms-2.0.6.1 spec/page_layout_spec.rb
alchemy_cms-2.0.5 spec/page_layout_spec.rb
alchemy_cms-2.0.4 spec/page_layout_spec.rb
alchemy_cms-2.0.3.1 spec/page_layout_spec.rb
alchemy_cms-2.1.beta1 spec/page_layout_spec.rb
alchemy_cms-2.0.3 spec/page_layout_spec.rb
alchemy_cms-2.0.2 spec/page_layout_spec.rb
alchemy_cms-2.0.1 spec/page_layout_spec.rb
alchemy_cms-2.0 spec/page_layout_spec.rb
alchemy_cms-2.0.rc6 spec/page_layout_spec.rb
alchemy_cms-2.0.rc5 spec/page_layout_spec.rb
alchemy_cms-2.0.rc4 spec/page_layout_spec.rb