Sha256: 2f5d19c5db736ce356e2f494279d78226600649a5d5573b88d3815451b9a8182
Contents?: true
Size: 978 Bytes
Versions: 4
Compression:
Stored size: 978 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 it "should not display hidden page layouts" do Alchemy::PageLayout.selectable_layouts(Factory(:language)).each { |e| e["hide"].should_not == true } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-2.2.rc6 | spec/page_layout_spec.rb |
alchemy_cms-2.2.rc3 | spec/page_layout_spec.rb |
alchemy_cms-2.2.rc2 | spec/page_layout_spec.rb |
alchemy_cms-2.2.rc1 | spec/page_layout_spec.rb |