Use dynamic fake data in the spec

This commit is contained in:
Henne Vogelsang 2016-05-02 15:25:18 +02:00
parent 4d38305110
commit 73ce49de25
14 changed files with 36 additions and 36 deletions

View file

@ -221,7 +221,7 @@ describe Event do
describe '#abstract_word_count' do
it 'counts words in abstract' do
event = build(:event)
expect(event.abstract_word_count).to eq(233)
expect(event.abstract_word_count).to eq(event.abstract.to_s.split.size)
event.update_attributes!(abstract: 'abstract.')
expect(event.abstract_word_count).to eq(1)
end