mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: specs for ruby 2.0.0-p247
This commit is contained in:
parent
3abeb5f793
commit
3922c9b6b5
2 changed files with 6 additions and 3 deletions
|
@ -191,10 +191,11 @@ describe TopicView do
|
|||
|
||||
context '#recent_posts' do
|
||||
before do
|
||||
24.times do # our let()s have already created 3
|
||||
Fabricate(:post, topic: topic, user: first_poster)
|
||||
24.times do |t| # our let()s have already created 3
|
||||
Fabricate(:post, topic: topic, user: first_poster, created_at: t.seconds.from_now)
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns at most 25 recent posts ordered newest first' do
|
||||
recent_posts = topic_view.recent_posts
|
||||
|
||||
|
|
|
@ -39,7 +39,9 @@ describe Post do
|
|||
|
||||
describe '#by_newest' do
|
||||
it 'returns posts ordered by created_at desc' do
|
||||
2.times { Fabricate(:post) }
|
||||
2.times do |t|
|
||||
Fabricate(:post, created_at: t.seconds.from_now)
|
||||
end
|
||||
Post.by_newest.first.created_at.should > Post.by_newest.last.created_at
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue