[rspec-users] testing scripts

Ashley Moran work at ashleymoran.me.uk
Tue Nov 13 15:43:53 EST 2007

On Nov 13, 2007, at 7:45 pm, barsalou wrote:

> What I'm doing now is wrapping the methods in a module, then including
> the module at the top of the script.

Can you post some examples of the modules, classes and methods you have?

Every script I've written is basically just a little object-oriented  
app that's got a bit at the end to fire off some "main" class with the  
command line args.  Testing one is no different than testing, say, lib  
code in Rails.  Ideally you want each bit of functionality in a class  
(and therefore file) of its own, so it can be tested in isolation.   
But without seeing what you've got, it's hard to guess where the  
problem lies.


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ home

More information about the rspec-users mailing list