Forum: IronRuby Thread status tests

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shri B. (Guest)
on 2009-01-07 11:02
(Received via mailing list)
There are four ways to check the status of threads, Thread#status,
Thread#inspect, Thread#alive?, and Thread#stop?. Any objection to adding
a single shared file which checks the result of all the four APIs? It
won't follow the standard pattern of it_behaves_like for aliases since
these are all different APIs and not aliases. However, it will help
check all of them consistently. I wanted to check  if this idea made
sense before pushing in that direction.

Thanks,
Shri
Jim D. (Guest)
on 2009-01-07 21:27
(Received via mailing list)
I would rather implement them all separately. They all act differently.
Status returns a simple string, inspect returns an inspection string,
and alive and stop are Boolean. I would leave the shared pattern for the
way it is now. You can probably take advantage of sharing methods in the
fixtures.

JD

From: Shri B.
Sent: Wednesday, January 07, 2009 12:43 AM
To: Jim D.
Cc: removed_email_address@domain.invalid
Subject: Thread status tests

There are four ways to check the status of threads, Thread#status,
Thread#inspect, Thread#alive?, and Thread#stop?. Any objection to adding
a single shared file which checks the result of all the four APIs? It
won't follow the standard pattern of it_behaves_like for aliases since
these are all different APIs and not aliases. However, it will help
check all of them consistently. I wanted to check  if this idea made
sense before pushing in that direction.

Thanks,
Shri
Shri B. (Guest)
on 2009-01-07 21:44
(Received via mailing list)
Yeah, I can probably unify the fixtures but leave the expectations in
the individual spec files.

From: Jim D.
Sent: Wednesday, January 07, 2009 11:25 AM
To: Shri B.
Cc: removed_email_address@domain.invalid
Subject: RE: Thread status tests

I would rather implement them all separately. They all act differently.
Status returns a simple string, inspect returns an inspection string,
and alive and stop are Boolean. I would leave the shared pattern for the
way it is now. You can probably take advantage of sharing methods in the
fixtures.

JD

From: Shri B.
Sent: Wednesday, January 07, 2009 12:43 AM
To: Jim D.
Cc: removed_email_address@domain.invalid
Subject: Thread status tests

There are four ways to check the status of threads, Thread#status,
Thread#inspect, Thread#alive?, and Thread#stop?. Any objection to adding
a single shared file which checks the result of all the four APIs? It
won't follow the standard pattern of it_behaves_like for aliases since
these are all different APIs and not aliases. However, it will help
check all of them consistently. I wanted to check  if this idea made
sense before pushing in that direction.

Thanks,
Shri
This topic is locked and can not be replied to.