Sha256: 8e908446be7d4d5d515ad2d9f3d1b325cd37067fd9475b6d264d7211b5e81fa0
Contents?: true
Size: 735 Bytes
Versions: 10
Compression:
Stored size: 735 Bytes
Contents
# TODO: test case for modifying a file updates or clobbers the proper attributes require 'spec_helper' module Landable describe Layout do it "creates themes" do Theme.destroy_all expect { described_class.all.each(&:to_theme) }.to change { Theme.count }.by(2) end it "defaults attributes" do theme = Theme.where(file: "application").first theme.attributes.should include({ name: 'Application', file: 'application', extension: 'erb', editable: false, description: 'Defined in application.html.erb' }.stringify_keys) theme.body.should == File.read(Rails.root.join('app/views/layouts/application.html.erb')) end end end
Version data entries
10 entries across 10 versions & 1 rubygems