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/
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
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
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
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
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
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
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)
>
>>>
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
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
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,
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
[...@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
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
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)
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
16 matches
Mail list logo