diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2008-12-05 09:38:11 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2008-12-05 09:38:11 +1000 |
commit | 4de32fb4812907bf3e7a778e1d266dd7b506f4f5 (patch) | |
tree | 864249c31a191024a5425d4fd881d60ff3cf203e | |
parent | 0288ab67b1f4b1f10c4e8fb4d2172118e4339639 (diff) | |
download | ffi-4de32fb4812907bf3e7a778e1d266dd7b506f4f5.tar.gz |
Add support for autotest. Patch from Andrea Fazzi <andrea.fazzi@alcacoop.it>
-rw-r--r-- | .autotest | 1 | ||||
-rw-r--r-- | spec/ffi/spec_helper.rb | 6 | ||||
-rw-r--r-- | spec/spec.opts | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/.autotest b/.autotest new file mode 100644 index 0000000..ee70f68 --- /dev/null +++ b/.autotest @@ -0,0 +1 @@ +Autotest.add_hook(:initialize) { ENV['MRI_FFI'] = '1' } diff --git a/spec/ffi/spec_helper.rb b/spec/ffi/spec_helper.rb index 9d26109..8a9299d 100644 --- a/spec/ffi/spec_helper.rb +++ b/spec/ffi/spec_helper.rb @@ -1,5 +1,9 @@ -$:.unshift File.join(File.dirname(__FILE__), "..", "lib") if ENV["MRI_FFI"] +require 'rubygems' +require 'spec' + +$:.unshift File.join(File.dirname(__FILE__), "../..", "lib"), File.join(File.dirname(__FILE__), "../..", "build") if ENV["MRI_FFI"] require "ffi" + module TestLibrary PATH = "#{Dir.getwd}/build/libtest.#{FFI::Platform::LIBSUFFIX}" end diff --git a/spec/spec.opts b/spec/spec.opts new file mode 100644 index 0000000..81b5382 --- /dev/null +++ b/spec/spec.opts @@ -0,0 +1,4 @@ +--color +--format +specdoc + |