File: helper.rb

package info (click to toggle)
ruby-innate 2013.02.21-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 848 kB
  • ctags: 622
  • sloc: ruby: 4,340; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
if caller_line = caller.grep(%r!spec/innate/!).first
  caller_file = caller_line.split(':', 2).first
  caller_root = File.dirname(caller_file)
  $0 = caller_file
end

require File.expand_path('../../lib/innate', __FILE__)
require 'innate/spec'

Innate.options.roots = [caller_root] if caller_root