On 14 Apr 2009, at 16:14, Brandt Kurowski wrote:
On Apr 13, 11:26 am, Pat Maddox wrote:
If this is a module that you're using to extend the behavior of
Numeric classes, just mix it in somewhere and write examples for the
class that got the mixin.
I prefer to test modules in isolation by mix
On Apr 13, 11:26 am, Pat Maddox wrote:
> If this is a module that you're using to extend the behavior of
> Numeric classes, just mix it in somewhere and write examples for the
> class that got the mixin.
I prefer to test modules in isolation by mixing them into a stub in
the spec, in order to mak
On Mon, Apr 13, 2009 at 8:17 AM, David Chelimsky wrote:
> On Mon, Apr 13, 2009 at 12:09 PM, Salil Gaikwad wrote:
>> How to write a spec file for a following helper
>>
>> module ArtistsHelper
>>
>> def round_to(x)
>> (self * 10**x).round.to_f / 10**x
>> end
>>
>> end
>
> in spec/helpers/artists
On Mon, Apr 13, 2009 at 12:09 PM, Salil Gaikwad wrote:
> How to write a spec file for a following helper
>
> module ArtistsHelper
>
> def round_to(x)
> (self * 10**x).round.to_f / 10**x
> end
>
> end
in spec/helpers/artists_helper_spec.rb:
describe AristsHelper do
it "rounds to " do
How to write a spec file for a following helper
module ArtistsHelper
def round_to(x)
(self * 10**x).round.to_f / 10**x
end
end
Regards
salil
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://