[rspec-users] How to write a spec file for a helper
David Chelimsky
dchelimsky at gmail.com
Mon Apr 13 11:17:39 EDT 2009
On Mon, Apr 13, 2009 at 12:09 PM, Salil Gaikwad <lists at ruby-forum.com> 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
helper.round_to(xxx).should == yyy
end
end
Cheers,
David
>
> Regards
>
> salil
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
More information about the rspec-users
mailing list