Skip to content

Commit

Permalink
Add specs for Session::Relation#tracking?
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Jun 24, 2013
1 parent 0169892 commit 290594d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/unit/rom/session/relation/tracking_predicate_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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

0 comments on commit 290594d

Please sign in to comment.