Sha256: e73e16f075fac868ddd9c6fbee49fde206951dfb06c1fa936f7669274c6b55df

Contents?: true

Size: 564 Bytes

Versions: 2

Compression:

Stored size: 564 Bytes

Contents

require_relative "spec_helper"

module Nyara
  describe Controller do
    it "inheritance validates name" do
      assert_raise RuntimeError do
        class NotControllerClass < Controller
        end
      end
    end

    it "inheritance of ivars" do
      class AParentController < Controller
        set_controller_name 'pp'
        set_default_layout 'll'
      end
      class AChildController < AParentController
      end

      assert_equal nil, AChildController.controller_name
      assert_equal 'll', AChildController.default_layout
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nyara-0.1.pre.0 spec/controller_spec.rb
nyara-0.0.1.pre.9 spec/controller_spec.rb