Skip to content

Instantly share code, notes, and snippets.

@neophiliac
Created October 4, 2015 21:08
Show Gist options
  • Save neophiliac/74725b779df62b953a14 to your computer and use it in GitHub Desktop.
Save neophiliac/74725b779df62b953a14 to your computer and use it in GitHub Desktop.
/home/vagrant/.rbenv/versions/1.9.3-p429/bin/ruby -S rspec ./spec/controllers/home_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/models/comment_spec.rb ./spec/models/email_parser_spec.rb ./spec/models/message_spec.rb ./spec/models/stories_paginator_spec.rb ./spec/models/story_repository_spec.rb ./spec/models/story_spec.rb ./spec/models/user_spec.rb ./spec/models/vote_spec.rb
/home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/activesupport-4.1.12/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- awesome_print (LoadError)
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/active from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `each'
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `load_spec_files'
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/command_line.rb:18:in `run'
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:103:in `run'
from /home/vagrant/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:17:in `block in autorun'
/home/vagrant/.rbenv/versions/1.9.3-p429/bin/ruby -S rspec ./spec/controllers/home_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/models/comment_spec.rb ./spec/models/email_parser_spec.rb ./spec/models/message_spec.rb ./spec/models/stories_paginator_spec.rb ./spec/models/story_repository_spec.rb ./spec/models/story_spec.rb ./spec/models/user_spec.rb ./spec/models/vote_spec.rb failed
vagrant@ubuntu:/vagrant$ vi spec/models/stories_paginator_spec.rb
vagrant@ubuntu:/vagrant$ rake /home/vagrant/.rbenv/versions/1.9.3-p429/bin/ruby -S rspec ./spec/controllers/home_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/models/comment_spec.rb ./spec/models/email_parser_spec.rb ./spec/models/message_spec.rb ./spec/models/stories_paginator_spec.rb ./spec/models/story_repository_spec.rb ./spec/models/story_spec.rb ./spec/models/user_spec.rb ./spec/models/vote_spec.rb
...................FFFF...F.FFF.F.F..F...............F...........F.....
Failures:
1) StoriesPaginator.page fake scope paginates given scope
Failure/Error: paginator.get
TypeError:
Cannot visit RSpec::Mocks::Double
# ./app/models/stories_paginator.rb:32:in `cache_votes'
# ./app/models/stories_paginator.rb:25:in `with_pagination_info'
# ./app/models/stories_paginator.rb:16:in `get'
# ./spec/models/stories_paginator_spec.rb:18:in `block (4 levels) in <top (required)>'
2) StoriesPaginator.page fake scope show more is true if scope.count > 25
Failure/Error: expect(paginator.get[1]).to eq true
TypeError:
Cannot visit RSpec::Mocks::Double
# ./app/models/stories_paginator.rb:32:in `cache_votes'
# ./app/models/stories_paginator.rb:25:in `with_pagination_info'
# ./app/models/stories_paginator.rb:16:in `get'
# ./spec/models/stories_paginator_spec.rb:26:in `block (5 levels) in <top (required)>'
3) StoriesPaginator.page fake scope show more is false if scope.count <= 25
Failure/Error: expect(paginator.get[1]).to eq false
TypeError:
Cannot visit RSpec::Mocks::Double
# ./app/models/stories_paginator.rb:32:in `cache_votes'
# ./app/models/stories_paginator.rb:25:in `with_pagination_info'
# ./app/models/stories_paginator.rb:16:in `get'
# ./spec/models/stories_paginator_spec.rb:31:in `block (5 levels) in <top (required)>'
4) StoriesPaginator.page integration saves if user have voted for the post
Failure/Error: expect(result.find { |s| s.id == s1.id }.vote).to eq 1
expected: 1
got: {:vote=>1, :reason=>nil}
(compared using ==)
# ./spec/models/stories_paginator_spec.rb:48:in `block (4 levels) in <top (required)>'
5) StoryRepository#hottest includes story with 3 downvote and 1 upvotes
Failure/Error: expect(subject).to include story
expected #<ActiveRecord::Relation []> to include #<Story id: 285, created_at: "2015-10-04 21:07:44", user_id: 537, url: "http://example.com/0017", title: "story title 0017", description: nil, short_id: "uh504g", is_expired: 0, upvotes: 1, downvotes: 3, is_moderated: 0, hotness: #<BigDecimal:60737c0,'-0.1671288037 04E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>
Diff:
@@ -1,2 +1,2 @@
-[#<Story id: 285, created_at: "2015-10-04 21:07:44", user_id: 537, url: "http://example.com/0017", title: "story title 0017", description: nil, short_id: "uh504g", is_expired: 0, upvotes: 1, downvotes: 3, is_moderated: 0, hotness: #<BigDecimal:60737c0,'-0.1671288037 04E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
+[]
# ./spec/models/story_repository_spec.rb:32:in `block (3 levels) in <top (required)>'
6) StoryRepository#hottest orders by hotness asc
Failure/Error: expect(subject).to eq [cool, meh, hot]
expected: [#<Story id: 289, created_at: "2015-10-04 21:07:44", user_id: 541, url: "http://example.com/0021", title: "story title 0021", description: nil, short_id: "xwreis", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62d9c80,'-0.1671318140 16E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 287, created_at: "2015-10-04 21:07:44", user_id: 539, url: "http://example.com/0019", title: "story title 0019", description: nil, short_id: "ctvjdj", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:620f840,'-0.1671318140 1E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 288, created_at: "2015-10-04 21:07:44", user_id: 540, url: "http://example.com/0020", title: "story title 0020", description: nil, short_id: "m2wrb9", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6271220,'-0.1671318140 13E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
got: #<ActiveRecord::Relation [#<Story id: 289, created_at: "2015-10-04 21:07:44", user_id: 541, url: "http://example.com/0021", title: "story title 0021", description: nil, short_id: "xwreis", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62dddf8,'-0.1671318140 16E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 288, created_at: "2015-10-04 21:07:44", user_id: 540, url: "http://example.com/0020", title: "story title 0020", description: nil, short_id: "m2wrb9", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62ddc68,'-0.1671318140 13E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 287, created_at: "2015-10-04 21:07:44", user_id: 539, url: "http://example.com/0019", title: "story title 0019", description: nil, short_id: "ctvjdj", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62ddad8,'-0.1671318140 1E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]>
(compared using ==)
Diff:
@@ -1,4 +1,4 @@
-[#<Story id: 289, created_at: "2015-10-04 21:07:44", user_id: 541, url: "http://example.com/0021", title: "story title 0021", description: nil, short_id: "xwreis", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62d9c80,'-0.1671318140 16E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
- #<Story id: 287, created_at: "2015-10-04 21:07:44", user_id: 539, url: "http://example.com/0019", title: "story title 0019", description: nil, short_id: "ctvjdj", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:620f840,'-0.1671318140 1E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
- #<Story id: 288, created_at: "2015-10-04 21:07:44", user_id: 540, url: "http://example.com/0020", title: "story title 0020", description: nil, short_id: "m2wrb9", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6271220,'-0.1671318140 13E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
+[#<Story id: 289, created_at: "2015-10-04 21:07:44", user_id: 541, url: "http://example.com/0021", title: "story title 0021", description: nil, short_id: "xwreis", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62dddf8,'-0.1671318140 16E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
+ #<Story id: 288, created_at: "2015-10-04 21:07:44", user_id: 540, url: "http://example.com/0020", title: "story title 0020", description: nil, short_id: "m2wrb9", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62ddc68,'-0.1671318140 13E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
+ #<Story id: 287, created_at: "2015-10-04 21:07:44", user_id: 539, url: "http://example.com/0019", title: "story title 0019", description: nil, short_id: "ctvjdj", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:62ddad8,'-0.1671318140 1E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
# ./spec/models/story_repository_spec.rb:45:in `block (3 levels) in <top (required)>'
7) StoryRepository#hottest logged in excludes downvoted stories
Failure/Error: expect(subject).not_to include downvoted
expected #<ActiveRecord::Relation [#<Story id: 290, created_at: "2015-10-04 21:07:44", user_id: 542, url: "http://example.com/0022", title: "story title 0022", description: nil, short_id: "emaymh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:43080a0,'-0.1671318140 23E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]> not to include #<Story id: 290, created_at: "2015-10-04 21:07:44", user_id: 542, url: "http://example.com/0022", title: "story title 0022", description: nil, short_id: "emaymh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:59743c0,'-0.1671318140 23E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>
Diff:
@@ -1,2 +1,2 @@
-[#<Story id: 290, created_at: "2015-10-04 21:07:44", user_id: 542, url: "http://example.com/0022", title: "story title 0022", description: nil, short_id: "emaymh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:59743c0,'-0.1671318140 23E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
+[#<Story id: 290, created_at: "2015-10-04 21:07:44", user_id: 542, url: "http://example.com/0022", title: "story title 0022", description: nil, short_id: "emaymh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:43080a0,'-0.1671318140 23E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
# ./spec/models/story_repository_spec.rb:54:in `block (4 levels) in <top (required)>'
8) StoryRepository#hidden logged in includes downvoted story
Failure/Error: expect(subject).to include downvoted
expected #<ActiveRecord::Relation []> to include #<Story id: 291, created_at: "2015-10-04 21:07:44", user_id: 544, url: "http://example.com/0023", title: "story title 0023", description: nil, short_id: "lbbxs3", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:5228620,'-0.1671318140 27E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>
Diff:
@@ -1,2 +1,2 @@
-[#<Story id: 291, created_at: "2015-10-04 21:07:44", user_id: 544, url: "http://example.com/0023", title: "story title 0023", description: nil, short_id: "lbbxs3", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:5228620,'-0.1671318140 27E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
+[]
# ./spec/models/story_repository_spec.rb:68:in `block (4 levels) in <top (required)>'
9) StoryRepository#newest orders by created_at
Failure/Error: expect(subject).to eq [story3, story1, story2]
expected: [#<Story id: 295, created_at: "2015-10-04 21:02:44", user_id: 550, url: "http://example.com/0027", title: "story title 0027", description: nil, short_id: "cioi7a", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6167a28,'-0.1671317793 17E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 293, created_at: "2015-10-04 20:07:44", user_id: 548, url: "http://example.com/0025", title: "story title 0025", description: nil, short_id: "l1pf6z", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:5be0500,'-0.1671313973 67E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 294, created_at: "2015-10-04 16:07:44", user_id: 549, url: "http://example.com/0026", title: "story title 0026", description: nil, short_id: "ka5mjh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:5f19640,'-0.1671297307 03E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
got: #<ActiveRecord::Relation [#<Story id: 295, created_at: "2015-10-04 21:02:44", user_id: 550, url: "http://example.com/0027", title: "story title 0027", description: nil, short_id: "cioi7a", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:616bb50,'-0.1671317793 17E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 294, created_at: "2015-10-04 16:07:44", user_id: 549, url: "http://example.com/0026", title: "story title 0026", description: nil, short_id: "ka5mjh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:616b9c0,'-0.1671297307 03E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 293, created_at: "2015-10-04 20:07:44", user_id: 548, url: "http://example.com/0025", title: "story title 0025", description: nil, short_id: "l1pf6z", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:616b830,'-0.1671313973 67E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]>
(compared using ==)
Diff:
@@ -1,4 +1,4 @@
-[#<Story id: 295, created_at: "2015-10-04 21:02:44", user_id: 550, url: "http://example.com/0027", title: "story title 0027", description: nil, short_id: "cioi7a", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6167a28,'-0.1671317793 17E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
- #<Story id: 293, created_at: "2015-10-04 20:07:44", user_id: 548, url: "http://example.com/0025", title: "story title 0025", description: nil, short_id: "l1pf6z", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:5be0500,'-0.1671313973 67E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
- #<Story id: 294, created_at: "2015-10-04 16:07:44", user_id: 549, url: "http://example.com/0026", title: "story title 0026", description: nil, short_id: "ka5mjh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:5f19640,'-0.1671297307 03E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
+[#<Story id: 295, created_at: "2015-10-04 21:02:44", user_id: 550, url: "http://example.com/0027", title: "story title 0027", description: nil, short_id: "cioi7a", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:616bb50,'-0.1671317793 17E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
+ #<Story id: 294, created_at: "2015-10-04 16:07:44", user_id: 549, url: "http://example.com/0026", title: "story title 0026", description: nil, short_id: "ka5mjh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:616b9c0,'-0.1671297307 03E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
+ #<Story id: 293, created_at: "2015-10-04 20:07:44", user_id: 548, url: "http://example.com/0025", title: "story title 0025", description: nil, short_id: "l1pf6z", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:616b830,'-0.1671313973 67E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
# ./spec/models/story_repository_spec.rb:86:in `block (3 levels) in <top (required)>'
10) StoryRepository#recent orders by created_at
Failure/Error: expect(subject).to eq [story3, story1, story2]
expected: [#<Story id: 301, created_at: "2015-10-04 21:02:44", user_id: 555, url: "http://example.com/0033", title: "story title 0033", description: nil, short_id: "klsqjr", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:63f6208,'-0.1671317793 34E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 299, created_at: "2015-10-04 20:07:44", user_id: 553, url: "http://example.com/0031", title: "story title 0031", description: nil, short_id: "obxeox", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:631cf30,'-0.1671313973 84E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 300, created_at: "2015-10-04 16:07:44", user_id: 554, url: "http://example.com/0032", title: "story title 0032", description: nil, short_id: "s1b5hh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:638e7e8,'-0.1671297307 2E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
got: #<ActiveRecord::Relation [#<Story id: 301, created_at: "2015-10-04 21:02:44", user_id: 555, url: "http://example.com/0033", title: "story title 0033", description: nil, short_id: "klsqjr", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6433bd0,'-0.1671317793 34E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 300, created_at: "2015-10-04 16:07:44", user_id: 554, url: "http://example.com/0032", title: "story title 0032", description: nil, short_id: "s1b5hh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6433a40,'-0.1671297307 2E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>, #<Story id: 299, created_at: "2015-10-04 20:07:44", user_id: 553, url: "http://example.com/0031", title: "story title 0031", description: nil, short_id: "obxeox", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:64338b0,'-0.1671313973 84E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]>
(compared using ==)
Diff:
@@ -1,4 +1,4 @@
-[#<Story id: 301, created_at: "2015-10-04 21:02:44", user_id: 555, url: "http://example.com/0033", title: "story title 0033", description: nil, short_id: "klsqjr", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:63f6208,'-0.1671317793 34E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
- #<Story id: 299, created_at: "2015-10-04 20:07:44", user_id: 553, url: "http://example.com/0031", title: "story title 0031", description: nil, short_id: "obxeox", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:631cf30,'-0.1671313973 84E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
- #<Story id: 300, created_at: "2015-10-04 16:07:44", user_id: 554, url: "http://example.com/0032", title: "story title 0032", description: nil, short_id: "s1b5hh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:638e7e8,'-0.1671297307 2E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>]
+[#<Story id: 301, created_at: "2015-10-04 21:02:44", user_id: 555, url: "http://example.com/0033", title: "story title 0033", description: nil, short_id: "klsqjr", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6433bd0,'-0.1671317793 34E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
+ #<Story id: 300, created_at: "2015-10-04 16:07:44", user_id: 554, url: "http://example.com/0032", title: "story title 0032", description: nil, short_id: "s1b5hh", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:6433a40,'-0.1671297307 2E5',18(27)>, markeddown_description: nil, story_cache: nil, comments_count: 0, merged_story_id: nil, unavailable_at: nil, twitter_id: nil, user_is_author: false>,
+ #<Story id: 299, created_at: "2015-10-04 20:07:44", user_id: 553, url: "http://example.com/0031", title: "story title 0031", description: nil, short_id: "obxeox", is_expired: 0, upvotes: 1, downvotes: 0, is_moderated: 0, hotness: #<BigDecimal:643 # ./spec/models/user_spec.rb:59:in `block (2 levels) in <top (required)>'
Deprecation Warnings:
Rspec is deprecated. Use RSpec instead. Called from /vagrant/spec/controllers/home_controller_spec.rb:4:in `block (2 levels) in <top (required)>'.
Use of rspec-core's `its` method is deprecated. Use the rspec-its gem instead. Called from /vagrant/spec/controllers/home_controller_spec.rb:19:in `block (4 levels) in <top (required)>'.
Use of rspec-core's `its` method is deprecated. Use the rspec-its gem instead. Called from /vagrant/spec/controllers/home_controller_spec.rb:20:in `block (4 levels) in <top (required)>'.
If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.
3 deprecation warnings total
Finished in 4.8 seconds
71 examples, 13 failures
Failed examples:
rspec ./spec/models/stories_paginator_spec.rb:16 # StoriesPaginator.page fake scope paginates given scope
rspec ./spec/models/stories_paginator_spec.rb:24 # StoriesPaginator.page fake scope show more is true if scope.count > 25
rspec ./spec/models/stories_paginator_spec.rb:29 # StoriesPaginator.page fake scope show more is false if scope.count <= 25
rspec ./spec/models/stories_paginator_spec.rb:46 # StoriesPaginator.page integration saves if user have voted for the post
rspec ./spec/models/story_repository_spec.rb:30 # StoryRepository#hottest includes story with 3 downvote and 1 upvotes
rspec ./spec/models/story_repository_spec.rb:40 # StoryRepository#hottest orders by hotness asc
rspec ./spec/models/story_repository_spec.rb:51 # StoryRepository#hottest logged in excludes downvoted stories
rspec ./spec/models/story_repository_spec.rb:65 # StoryRepository#hidden logged in includes downvoted story
rspec ./spec/models/story_repository_spec.rb:81 # StoryRepository#newest orders by created_at
rspec ./spec/models/story_repository_spec.rb:107 # StoryRepository#recent orders by created_at
rspec ./spec/models/story_repository_spec.rb:135 # StoryRepository#tagged includes story with 3 downvote and 1 upvotes
rspec ./spec/models/story_spec.rb:92 # Story can fetch its title properly
rspec ./spec/models/user_spec.rb:57 # User unbans a user
/home/vagrant/.rbenv/versions/1.9.3-p429/bin/ruby -S rspec ./spec/controllers/home_controller_spec.rb ./spec/helpers/application_helper_spec.rb ./spec/models/comment_spec.rb ./spec/models/email_parser_spec.rb ./spec/models/message_spec.rb ./spec/models/stories_paginator_spec.rb ./spec/models/story_repository_spec.rb ./spec/models/story_spec.rb ./spec/models/user_spec.rb ./spec/models/vote_spec.rb failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment