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