Subject:
[ruby-ffi] Value in gem-time and build-time testing?
From:
Jon
Date:
10/6/09 2:13 PM
To:
ruby-ffi


Is there any value in having "gem-time" spec-based testing as well as
build-time testing?

What I mean by this is, imagine you've just installed the latest FFI
*binary* gem on your Win32 system.  You notice that the FFI gem has a
spec directory and a Rakefile with a specs task.  You decide you'd
like to run the developer created specs to get more comfortable with
FFI.

You decide to humor your OCD bad habits by the following from the FFI
gem dir

> spec spec
[boom] need win32console for coloring and get a LoadError due to
missing build/libtest.dll from spec/ffi/spec_helper.rb:16:in
`<module:LibTest>'

All the spec support is currently targeted to having the build
environment dependencies, which is great.

But I'm wondering if something quick like adding a new task that
allows one to run specs (even a smaller but still valid subset of the
full suite) adds any value?  Probably could call spec with a creative
Dir["..."] and should get rid of the rake-compiler and bones
dependencies.  Probably don't want to have libtest.dll as part of the
binary gem unless you want to build fat-binary support for both
libtest and ffi_c.so

So, is there any value in the effort even if it is only a "feel good"
tool for those just beginning with FFI?  Could also be part of an "FFI
ready" check post gem install.

Jon