Sha256: c42d66794bff51df5bac193e4f70574459323f526ada59fe177f59e67a7b6197

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  include_context 'Session::Relation'

  let(:user) { model.new(id: 3, name: 'John') }

  context 'when the object is being tracked' do
    before do
      users.track(user)
    end

    it { should be(true) }
  end

  context 'when the object is not being tracked' do
    it { should be(false) }
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
rom-0.2.0 spec/unit/rom/session/relation/tracking_predicate_spec.rb
rom-session-0.1.1 spec/unit/rom/session/relation/tracking_predicate_spec.rb
rom-session-0.1.0 spec/unit/rom/session/relation/tracking_predicate_spec.rb