Sha256: ef5000fb20ecfbd54b1ce45bf283029908281854c8716d2fc1a765c53a784692

Contents?: true

Size: 512 Bytes

Versions: 63

Compression:

Stored size: 512 Bytes

Contents

require 'spec_helper'

describe Saucy::Layouts do
  it "allows a layout to be assigned" do
    subject.accounts.index = "custom"
    subject.accounts.index.should == "custom"
  end

  it "defaults to the application layout" do
    subject.accounts.index.should == "application"
  end

  it "selects a layout for a controller" do
    controller = AccountsController.new
    controller.stubs(:action_name => 'index')
    block = subject.class.to_proc

    block.call(controller).should == 'application'
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
saucy-0.1.3 spec/layouts_spec.rb
saucy-0.1.2 spec/layouts_spec.rb
saucy-0.1.1 spec/layouts_spec.rb