Sha256: 7021030a47763df2b044562a9df849696b31613a2f19bd46a1c896056a99c50d

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

require 'spec_helper'

class MyAssistant < Controll::Assistant
  controller_methods :params
end

class MyController
  def params
    {:id => 7}
  end

  def my_assistant
    @my_assistant ||= MyAssistant.new self
  end
end

describe Controll::Assistant do
  context 'My assistant with params delegation' do
    subject { MyAssistant.new controller }

    let(:controller) { MyController.new }

    its(:controller) { should == controller }
    its(:params) { should == {:id => 7} }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
controll-0.3.2 spec/controll/assistant_spec.rb
controll-0.3.1 spec/controll/assistant_spec.rb
controll-0.3.0 spec/controll/assistant_spec.rb