[rspec-users] Problem with Before Filters

2009-12-09 Thread Amit Kulkarni
Hello, I am writing controller specs.I want to know how can i write specs which invlove before filters in controllers. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/

[rspec-users] Need Help with Specs failing when using ActionMailer

2009-12-09 Thread Brad
No one was able to help me with the last post so I thought I would try again with more details. I am having problems with specs that invoke the mailer. My User model has a method that invokes a mailer as part of the create_from_signup method. First an example of the test that passes in my spec/m

Re: [rspec-users] Custom Matcher and Webrat methods

2009-12-09 Thread Rodrigo Rosenfeld Rosas
Matt Wynne escreveu: On 8 Dec 2009, at 22:04, Rodrigo Rosenfeld Rosas wrote: I would like to be able to write a custom matcher so that I could call this test, for instance: @user.should be_allowed_to_visit(url) @non_welcome.should_not be_allowed_to_visit(url) The matcher would call Webrat m

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rodrigo Rosenfeld Rosas
Rick DeNatale escreveu: On Wed, Dec 9, 2009 at 1:15 PM, David Chelimsky wrote: On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox wrote: [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) [...@admin, @allowed_user].should all_be_allowed_to_visit(url) I prefer the first so as not

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rick DeNatale
On Wed, Dec 9, 2009 at 1:15 PM, David Chelimsky wrote: > On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox > wrote: >> [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) >> [...@admin, @allowed_user].should all_be_allowed_to_visit(url) >> I prefer the first so as not to introduce more "ma

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rodrigo Rosenfeld Rosas
Paul Hinze escreveu: Wincent Colaiuta on 2009-12-09 at 13:39: El 09/12/2009, a las 19:15, David Chelimsky escribió: On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox wrote: [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) [...@admin, @allowed_user].should all_be_allowe

[rspec-users] Autospec is running the full suite too often

2009-12-09 Thread DEfusion
This is a problem I experience quite a bit: 1) Create a spec and outline all the examples (as not yet implemented) 2) Write the body of a example 3) Autospec runs spec -> fail 4) Make that example pass 5) Autospec runs spec -> pass 6) Autospec then runs the entire test suite again 7) Goto 2 (but n

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Paul Hinze
Wincent Colaiuta on 2009-12-09 at 13:39: > El 09/12/2009, a las 19:15, David Chelimsky escribió: > >> On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox > > wrote: >>> [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) >>> [...@admin, @allowed_user].should all_be_allowed_to_visit(url) > >>>

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Matt Wynne
On 9 Dec 2009, at 19:16, Wincent Colaiuta wrote: El 09/12/2009, a las 19:15, David Chelimsky escribió: On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox > wrote: [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) [...@admin, @allowed_user].should all_be_allowed_to_visit(url) On Dec

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rick DeNatale
On Wed, Dec 9, 2009 at 2:16 PM, Wincent Colaiuta wrote: > El 09/12/2009, a las 19:15, David Chelimsky escribió: > >> On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox >> wrote: >>> >>> [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) >>> [...@admin, @allowed_user].should all_be_allowed_t

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Wincent Colaiuta
El 09/12/2009, a las 19:15, David Chelimsky escribió: On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox > wrote: [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) [...@admin, @allowed_user].should all_be_allowed_to_visit(url) On Dec 9, 2009, at 5:27 AM, David Chelimsky wrote: On Wed,

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread David Chelimsky
On Wed, Dec 9, 2009 at 11:55 AM, Pat Maddox wrote: > [...@admin, @allowed_user].should all(be_allowed_to_visit(url)) > [...@admin, @allowed_user].should all_be_allowed_to_visit(url) > I prefer the first so as not to introduce more "magic" but if it catches on > then moving to the second might be w

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Pat Maddox
[...@admin, @allowed_user].should all(be_allowed_to_visit(url)) [...@admin, @allowed_user].should all_be_allowed_to_visit(url) I prefer the first so as not to introduce more "magic" but if it catches on then moving to the second might be worthwhile. Pat On Dec 9, 2009, at 5:27 AM, David Chelims

Re: [rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread David Chelimsky
On Wed, Dec 9, 2009 at 5:41 AM, Rodrigo Rosenfeld Rosas < lboc...@yahoo.com.br> wrote: > I was thinking that it would be great to add 2 additional methods to > Object: should_all and should_none. > > The idea is that we would be able to write tests like: > > [...@admin, @allowed_user].should_all b

[rspec-users] New RSpec methods to Object proposal: should_all and should_none

2009-12-09 Thread Rodrigo Rosenfeld Rosas
I was thinking that it would be great to add 2 additional methods to Object: should_all and should_none. The idea is that we would be able to write tests like: [...@admin, @allowed_user].should_all be_allowed_to_visit(url) [...@unprivileged, @non_welcome].should_none be_allowed_to_visit(url)

Re: [rspec-users] Custom Matcher and Webrat methods

2009-12-09 Thread Matt Wynne
On 8 Dec 2009, at 22:04, Rodrigo Rosenfeld Rosas wrote: I would like to be able to write a custom matcher so that I could call this test, for instance: @user.should be_allowed_to_visit(url) @non_welcome.should_not be_allowed_to_visit(url) The matcher would call Webrat methods such as 'visit