search for: tickets_controller_spec

Displaying 3 results from an estimated 3 matches for "tickets_controller_spec".

2007 Aug 17
11
[rspec] looking for a simple refresher
...for a few months and I''m trying to get back on it. 1) Spec::Mocks::MockExpectationError in ''TicketsController handling POST /tickets should create a new ticket'' Mock ''Ticket_1001'' expected :new with ({}) once, but received it 0 times ./spec/controllers/tickets_controller_spec.rb:16: script/spec:4: class TicketsController < ApplicationController def new Ticket.new end end describe TicketsController, "handling POST /tickets" do before do @ticket = mock_model(Ticket, :to_param => ''1'', :save => true) Ticket.stub!(:...
2007 Aug 21
2
using restful_authentication current_user inside controller specs
...; You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.include? /Volumes/EXTERNAL/web/yellowticket/vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/assigns_hash_proxy.rb:10:in `[]'' ./spec/controllers/tickets_controller_spec.rb:14: My guess is that I''m not allow to do this: assigns[:ticket].user How do I apple the assignment with current_user? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070821/e6e65469/attachment.htm...
2007 Jun 14
1
rspec will_paginate
...w" do do_get assigns[:tickets].should == [@tickets] end end 1) ''TicketsController handling GET /tickets should assign the found tickets for the view'' FAILED expected [#<Ticket:0x1aa340c @name="Ticket_1000">], got [nil] (using ==) ./spec/controllers/tickets_controller_spec.rb:71: script/spec:4: Finished in 0.207992 seconds 13 examples, 1 failure Any suggestions or criticisms about my rspec? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070614/e421636a/attachment.html