ioquatix/ffi-clang — pull request #12 by sabottenda (2014-02-02 08:50:02+00:00)
Title: Fix failing tests with libclang 3.2 and 3.3

With libclang 3.2 and 3.3 there are some reasons for failing tests.
- APIs for newer versions are used.
- API behavior changes

`FFI::Clang::Utils.satisfy_version?` that uses `clang_getClangVersion` to obtain libclang version is used for newer APIs check . The method is used for attach_function only for now, which means if you use some methods which depends on newer API, it raises `NoMethodError`.

For behavior changes, I introduced rspec tag to change test cases for each versions. Something like `upto_3_3` and `from_3_4` tag is offered to test cases, those tests depend libclang version whether to be executed . `upto_3_3` means 3.3 or lower versions only, and `from_3_4` means 3.4 or higher versions only.
Ignored tags for rspec runtime are automatically offered (in spec_helper). The version of libclang for tests is specified by environment variable `LLVM_VERSION` (or latest version of supported versions if not specified).