On 7/11/07, Wincent Colaiuta <[EMAIL PROTECTED]> wrote:
> El 11/7/2007, a las 12:42, Ashley Moran escribió:
>
> > I've noticed that I phrase a lot of shared behaviours in plural, eg
> >
> >    describe "All payment_details views"
> >
> > How about a "they" alias to "it" so you can write
> >
> >    describe "All payment_details views", :shared => true do
> >      they "should have a card number field" do
> >        # ...
> >      end
> >    end
> >
> > WDYT?
>
> In a case like this, isn't "All" the same as "any" or even "a", or
> even omitting the article entirely?
>
> For example:
>
>    describe 'Any payment_details view' do
>      it 'should have a card number field' do
>        ...
>
>    describe 'A payment_details view' do
>      it 'should have a card number field' do
>        ...
>
>    describe 'payment_details view' do
>      it 'should have a card number field' do
>        ...
>
>    # or whatever the class is called
>    describe PaymentDetailsView do
>      it 'should have a card number field' do
>        ...

Excellent point. I'm sure the code in each example would be dealing
with a single object, not all objects.

>
> Cheers,
> Wincent
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to