Re: [rspec-users] Rails 3, Rspec 2 - flash notice

2010-04-29 Thread Andrei Erdoss
My mistake. I left out a very important piece of the spec. @message.stub(:save).and_return(true) Everything is working fine. Thanks for your help. On Wed, Apr 28, 2010 at 2:03 PM, David Chelimsky wrote: > On Apr 28, 2010, at 9:01 AM, Andrei Erdoss wrote: > > The flash notice test is no

Re: [rspec-users] Rails 3, Rspec 2 - flash notice

2010-04-28 Thread Andrei Erdoss
The flash notice test is not working in 2.0.0.beta.8. I tried it with redirect_to messages_path, :notice => "message" or redirect_to messages_path, :flash => {:notice => "message" } On Wed, Apr 28, 2010 at 1:08 AM, David Chelimsky wrote: > On Apr 27, 2010, at 9:1

Re: [rspec-users] Rails 3, Rspec 2 - flash notice

2010-04-27 Thread Andrei Erdoss
:59 PM, David Chelimsky wrote: > On Apr 27, 2010, at 4:48 PM, Andrei Erdoss wrote: > > > Hello, > > > > I also tried testing for the flash notice being set, but it's not > working. > > > > it "sets a flash[:notice] message" do > > post :

[rspec-users] Rails 3, Rspec 2 - flash notice

2010-04-27 Thread Andrei Erdoss
ce. redirect_to messages_path, :notice => "The message was saved successfully." Anybody have some insight on this? -- Andrei Erdoss ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rspec 2 and Rails 3 - missing template

2010-04-27 Thread Andrei Erdoss
Great! Thanks. Will Rspec 2 provide isolation from view templates or is this a design change? On Tue, Apr 27, 2010 at 5:12 PM, David Chelimsky wrote: > On Tue, Apr 27, 2010 at 4:12 PM, David Chelimsky > wrote: > > On Tue, Apr 27, 2010 at 4:04 PM, Andrei Erdoss wrote: > >&

Re: [rspec-users] Rspec 2 and Rails 3 - missing template

2010-04-27 Thread Andrei Erdoss
Thank you for the fast response. What's the best way to handle the scenario described with Rails 3, Rspec 2? On Tue, Apr 27, 2010 at 4:51 PM, David Chelimsky wrote: > On Apr 27, 2010, at 3:46 PM, Andrei Erdoss wrote: > > > Hello, > > > > I am following the exampl

[rspec-users] Rspec 2 and Rails 3 - missing template

2010-04-27 Thread Andrei Erdoss
sages/create with {:locale=>[:en, :en], :handlers=>[:haml, :rjs, :builder, :rhtml, :erb, :rxml], :formats=>[:html]} in view paths "/myapps/app/views" I am using Rspec 2, Rails 3 and Haml. Did anybody else have this issue? Has something changed in the Rspec api, but it hasn'

Re: [rspec-users] Best approach to spec'ing this

2010-02-22 Thread Andrei Erdoss
data in form the database? > > Thanks > > Matt > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Andrei Erdoss ___ rspec-users

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-17 Thread Andrei Erdoss
___ > > rspec-users mailing list > > rspec-users@rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http

Re: [rspec-users] When to use Factories, Mock Models, Mocks & Stubs

2010-02-02 Thread Andrei Erdoss
roject > @client.should_receive(:save).and_return true > @project.should_receive(:name).and_return "New Project" >end > >it "should set up the flash" do > post "create", {:project =&

Re: [rspec-users] Problem with Before Filters

2009-12-14 Thread Andrei Erdoss
e > -- > Posted via http://www.ruby-forum.com/. > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Andrei Erdoss ___ rspec

Re: [rspec-users] Stubbing calls to S3 from Paperclip

2009-12-11 Thread Andrei Erdoss
Ok, I found something that works. @photo.stub!(:save_attached_files).and_return(true) On Fri, Dec 11, 2009 at 5:32 PM, Andrei Erdoss wrote: > Any idea on how to stub calls to Amazon S3 from the Paperclip plugin? > > -- > Andrei Erdoss > --

[rspec-users] Stubbing calls to S3 from Paperclip

2009-12-11 Thread Andrei Erdoss
Any idea on how to stub calls to Amazon S3 from the Paperclip plugin? -- Andrei Erdoss ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] rspecing rjs - form.reset('form')

2008-12-11 Thread Andrei Erdoss
uot;)/) That also failed. Any ideas? On Thu, Dec 11, 2008 at 10:26 AM, s.ross wrote: > On Dec 10, 2008, at 10:27 AM, Andrei Erdoss wrote: > > Hello, >> >> I couldn't find much info on this. >> >> How do you rspec this: page.form.reset("form")

[rspec-users] rspecing rjs - form.reset('form')

2008-12-10 Thread Andrei Erdoss
Hello, > > I couldn't find much info on this. > > How do you rspec this: page.form.reset("form") > > I looked in the have_rjs source code and I can't find anything on form > reset. > > Thanks, > > -- > Andrei > ___ rspec-users mailing list rspec-users@ru

[rspec-users] Rspec and RJS - form.reset

2008-12-10 Thread Andrei Erdoss
Hello, I couldn't find much info on this. How do you rspec this: page.form.reset("tag_form") I looked in the have_rjs source code and I can't find anything on form reset. Thanks, -- Andrei ___ rspec-users mailing list rspec-users@rubyforge.org http:

Re: [rspec-users] Restful Authentication and Cucumber

2008-11-27 Thread Andrei Erdoss
uot;) clicks_button("Log in") User.find_by_name("quentin").should_not be_nil response.body.should =~ /Logged/m end On Thu, Nov 27, 2008 at 1:30 PM, David Chelimsky <[EMAIL PROTECTED]>wrote: > On Wed, Nov 26, 2008 at 11:58 PM, Andrei Erdoss <[EMAIL PROTECTED]>

[rspec-users] Restful Authentication and Cucumber

2008-11-26 Thread Andrei Erdoss
Hello, I am using Restful Authentication and I would like to login in Cucumber. I am having trouble keeping the user logged in. I tried finding a solution for this everywhere. Only source is this article: http://afreshcup.com/2008/10/09/authentication-in-cucumber-tests/ This is how my feature loo

Re: [rspec-users] ActiveRecord::RecordNotFound error Cucumber/Webrat

2008-11-26 Thread Andrei Erdoss
;Atlanta"). The problem is that the login page is shown and not the show page with the new place created. What do I have to set in Cucumber so that it acts as if the user is logged in? In know that in Rspec :login_required should return true. What's the equivalent of that in Cucumber? Thank you

[rspec-users] ActiveRecord::RecordNotFound error Cucumber/Webrat

2008-11-26 Thread Andrei Erdoss
nd Place with ID=1 (ActiveRecord::RecordNotFound) Given /I am on the new place page with parent place "(.*)"/ do |name| visits "/places/new?parent_id=1" Place.create! :name => name, :parent_id => 1 end What am I doing wrong or how should I proceed with writing these

[rspec-users] ActiveRecord::RecordNotFound error Cucumber/Webrat

2008-11-26 Thread Andrei Erdoss
nd Place with ID=1 (ActiveRecord::RecordNotFound) Given /I am on the new place page with parent place "(.*)"/ do |name| visits "/places/new?parent_id=1" Place.create! :name => name, :parent_id => 1 end What am I doing wrong or how should I proceed with writing these