Sha256: 4cd07767fb3a3e1440ce847462daab52d3f8110e2f831745458d0a734e3bb6d6

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

require 'spec_helper'

class SessionAssistant < Controll::SessionAssistant
  session_methods :name
end

class MyController
  include Controll::SessionAssistant::Helper

  def session
    {:name => 'kris'}
  end

  session_assistant ::SessionAssistant
end

describe Controll::Assistant do
  context 'Session assistant' do
    subject { SessionAssistant.new controller }

    let(:controller) { MyController.new }

    its(:controller) { should == controller }
    its(:session) { should == {:name => 'kris'} }
    its(:name) { should == 'kris' }

    specify do
      controller.sess(:name).should == 'kris'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
controll-0.3.2 spec/controll/assistant/session_assistant_spec.rb
controll-0.3.1 spec/controll/assistant/session_assistant_spec.rb
controll-0.3.0 spec/controll/assistant/session_assistant_spec.rb