Commit d2b39c783129299d10a687678c58b0799b1ee6ff

Authored by Heitor
Committed by Rafael Manzo
1 parent ac95a8e8

Finished reading group integration

Signed-off-by:Rafael R. Manzo <rr.manzo@gmail.com>
Showing 1 changed file with 5 additions and 7 deletions   Show diff stats
spec/models/reading_group_spec.rb
... ... @@ -40,15 +40,13 @@ describe ReadingGroup, :type =&gt; :model do
40 40 end
41 41  
42 42 describe 'readings' do
43   - pending 'method readings_of' do
44   - subject { FactoryGirl.build(:reading_group) }
45   - let(:reading) { FactoryGirl.build(:reading) }
  43 + subject { FactoryGirl.build(:reading_group) }
  44 + let(:reading) { FactoryGirl.build(:reading) }
46 45  
47   - it 'should call readings_of on the Reading model' do
48   - Reading.expects(:readings_of).with(subject.id).returns([reading])
  46 + it 'should call readings_of on the Reading model' do
  47 + subject.expects(:readings).returns([reading])
49 48  
50   - expect(subject.readings).to include(reading)
51   - end
  49 + expect(subject.readings).to include(reading)
52 50 end
53 51 end
54 52 end
... ...