Sha256: 9d0cea76e2bba339becfc98d528870ab5dc11f3f67f15c2f1e6f41a47fdff602

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Session::Relation, '#state' do
  subject { users.state(user) }

  include_context 'Session::Relation'

  context 'when object is tracked' do
    it { should be_kind_of(Session::State) }

    its(:object) { should be(user) }
  end

  context 'when object is not tracked' do
    let(:user) { model.new }

    specify do
      expect { subject }.to raise_error(Session::ObjectNotTrackedError)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom-0.2.0 spec/unit/rom/session/relation/state_spec.rb