Sha256: f4f0fc416b4e673c841ab478fecf950cb9132b136b49d3ec9a5a70bee8cf715a

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 Bytes

Contents

require 'test_helper'

describe Lotus::View do
  describe '.layout=' do
    before do
      Lotus::View.unload!

      class ViewWithInheritedLayout
        include Lotus::View
      end

      Lotus::View.layout = :application
      Lotus::View.load!
    end

    after do
      Lotus::View.unload!
      Object.send(:remove_const, :ViewWithInheritedLayout)
      Lotus::View.layout = nil
      Lotus::View.load!
    end

    it 'sets global layout' do
      ViewWithInheritedLayout.layout.must_equal ApplicationLayout
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lotus-view-0.1.0 test/view_test.rb