[rspec-users] How to spec accessing a constant
cdemyanovich at gmail.com
Wed Oct 15 21:59:09 EDT 2008
On Wed, Oct 15, 2008 at 8:47 PM, Nick Hoffman <nick at deadorange.com> wrote:
> On 2008-10-15, at 16:39, Craig Demyanovich wrote:
>> Probably, I would just check the outcome of the method instead of checking
>> interaction with a constant.
> So you guys wouldn't worry about the spec for class A being coupled to this
> constant in class B?
Since class A is coupled to class B, the specs for A are also coupled to
class B through class A. Thus, I wouldn't worry about the coupling. Why does
a method of class A directly access a constant of class B? Does the constant
belong in class A? Does the method belong in class B? If you can and want to
be more specific with your code and specs, I'm sure that we can all write
some specs together.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users