Sha256: 847a0db6349e9c8c42ea4713b0b9cd7298197c66b88418be2d6625dd080da35d

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

require 'spec_helper'

module Fendhal
  describe Controller do

    class TestController < Controller

      class Index < Action

        def action
          "Here's the action!"
        end

      end

      defines :index

    end

    let (:controller) { TestController.new }

    it 'defines the specified actions' do
      controller.should respond_to :index
    end

    it 'delegates to the respective classes for each action' do
      controller.index.should eq "Here's the action!"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fendhal-0.0.1 spec/lib/fendhal/controller_spec.rb