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 not working

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

2010-04-28 Thread David Chelimsky
On Apr 28, 2010, at 9:01 AM, Andrei Erdoss wrote: > 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" } Please add an issue for this: http://github.com/rspec/rs

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:19 PM, Andrei Erdoss wrote: > > I a

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

2010-04-27 Thread David Chelimsky
On Apr 27, 2010, at 9:19 PM, Andrei Erdoss wrote: > I am using this line in my Gemfile: gem "rspec-rails", :git => > "git://github.com/rspec/rspec-rails.git" > > which installs the rspec-rails-2.0.0.beta.7 I released beta.8 yesterday, so if you "bundle install" you should get the update. I

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

2010-04-27 Thread Andrei Erdoss
I am using this line in my Gemfile: gem "rspec-rails", :git => "git:// github.com/rspec/rspec-rails.git" which installs the rspec-rails-2.0.0.beta.7 I tried beta.8 but I get an error: Rspec is not missing constant Matchers! (ArgumentError) On Tue, Apr 27, 2010 at 5:59 PM, David Chelimsky wrote

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

2010-04-27 Thread David Chelimsky
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 :create > flash[:notice].should == "The message was saved successfully." > end > > this is the line in

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

2010-04-27 Thread Andrei Erdoss
Hello, I also tried testing for the flash notice being set, but it's not working. it "sets a flash[:notice] message" do post :create flash[:notice].should == "The message was saved successfully." end this is the line in the controller that's setting the notice. redirect_to messages_path, :n