diff options
author | Vít Ondruch <vondruch@redhat.com> | 2015-01-23 16:53:51 +0100 |
---|---|---|
committer | Vít Ondruch <vondruch@redhat.com> | 2015-01-23 16:53:51 +0100 |
commit | 52ceccc9234a373ae1b78f33f8fd49396af9cc05 (patch) | |
tree | 3a828958413cbd8d1050d472e6df406a3bec9b98 | |
parent | b498a1de3fc1ea1a67b56cf03bf163375418be00 (diff) | |
download | rubygem-debug_inspector-52ceccc9234a373ae1b78f33f8fd49396af9cc05.tar.gz rubygem-debug_inspector-52ceccc9234a373ae1b78f33f8fd49396af9cc05.tar.xz rubygem-debug_inspector-52ceccc9234a373ae1b78f33f8fd49396af9cc05.zip |
Add smoke test.
-rw-r--r-- | rubygem-debug_inspector.spec | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rubygem-debug_inspector.spec b/rubygem-debug_inspector.spec index 9bf0a1f..2fb4b04 100644 --- a/rubygem-debug_inspector.spec +++ b/rubygem-debug_inspector.spec @@ -54,6 +54,25 @@ rm -rf %{buildroot}%{gem_instdir}/ext/ chmod -x %{buildroot}%{gem_dir}/gems/%{gem_name}-%{version}/Rakefile +%check +pushd .%{gem_instdir} +# No upstream test suite available :/ but we can do some smoke test :) +ruby -Ilib:$(dirs +1)%{gem_extdir_mri} - << \EOF | grep '#<Class:RubyVM::DebugInspector>' + require 'debug_inspector' + + # Open debug context + # Passed `dc' is only active in a block + RubyVM::DebugInspector.open { |dc| + # backtrace locations (returns an array of Thread::Backtrace::Location objects) + locs = dc.backtrace_locations + + # class of i-th caller frame + p dc.frame_class(0) + } +EOF +popd + + %files %doc %{gem_instdir}/README.md %dir %{gem_instdir} |