Re: [rspec-users] [HELP] should receive :new but does not

2008-07-22 Thread Camilo Torres
ue.should_receive(:save).and_return(:false) > # you should define the "should receive" before calling "post :create" > > post :create, { :issue => {:title => 'some > title', :description => ''}} > end

[rspec-users] [HELP] should receive :new but does not

2008-07-22 Thread Camilo Torres
Hello, I am learning rspec/rspec-rails and ruby on rails. Controller: class IssuesController < ApplicationController def index end def new @issue = Issue.new end def create @issue = Issue.new

Re: [rspec-users] Odd Date-based spec failing

2008-06-30 Thread Camilo Torres
It seems your Phase.percentage_complete is not working as you expect. It clearly returns 100 when you are specting 83. The test clearly said that. ¿What is the implementation of your percentage_complete method? 2008/7/1 Matt Darby <[EMAIL PROTECTED]>: > Hrm. > > I have a spec for a model 'Phase'.

Re: [rspec-users] [HELP]No :secret given to the #protect_from_forgery call

2008-03-16 Thread Camilo Torres
nt > config.action_controller.allow_forgery_protection= false > > > -Mike > > > On Sat, Mar 15, 2008 at 2:26 PM, Scott Taylor > <[EMAIL PROTECTED]> wrote: > > > > > > On Mar 16, 2008, at 2:41 PM, Camilo Torres wrote: > > > >

[rspec-users] [HELP]No :secret given to the #protect_from_forgery call

2008-03-15 Thread Camilo Torres
I am starting to BDD. When specing the controller I want to test for object creation: it "deberia crear una nueva persona en post create" do Usuario.should_receive(:create).with({:nombre => "camilo", :clave => "secreta", :tipo => "administrador"}).and_return(@usuario) post 'create', {:u