Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1.  
  2. let(:solr_document) { SolrDocument.new(work.to_solr) }
  3. let(:presenter) { described_class.new(solr_document, ability) }
  4.  
  5. describe 'stats_path' do
  6. let(:user) { 'sarah' }
  7. let(:ability) { double "Ability" }
  8. let(:work) { build(:generic_work, id: '123abc') }
  9. it { expect(presenter.stats_path).to eq (Sufia::Engine.routes.url_helpers.stats_work_path) }
  10. end
  11.  
  12. 1) Sufia::WorkShowPresenter stats_path
  13. Failure/Error: it { expect(presenter.stats_path).to eq (Sufia::Engine.routes.url_helpers.stats_work_path) }
  14.  
  15. ActionController::UrlGenerationError:
  16. No route matches {:action=>"work", :controller=>"stats"} missing required keys: [:id]
  17. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/journey/formatter.rb:46:in `generate'
  18. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:719:in `generate'
  19. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:750:in `generate'
  20. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:797:in `url_for'
  21. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:280:in `call'
  22. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:223:in `call'
  23. # ./.bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/routing/route_set.rb:345:in `block (2 levels) in define_url_helper'
  24. # ./spec/presenters/sufia/work_show_presenter_spec.rb:11:in `block (3 levels) in <top (required)>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement