pelle / rspactor forked from rubyphunk/rspactor

This is a fork of the original pre Cocoa version of rspactor. To keep it up to date with new rspec versions.

This URL has Read+Write access

rspactor / rb_main.rb
100644 19 lines (16 sloc) 0.482 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'osx/cocoa'
require 'syntax'
require 'html'
 
def rb_main_init
  path = OSX::NSBundle.mainBundle.resourcePath.fileSystemRepresentation
  rbfiles = Dir.entries(path).select {|x| /\.rb\z/ =~ x}
  rbfiles -= [ File.basename(__FILE__) ]
  rbfiles.each do |path|
    require( File.basename(path) ) unless path.include?('rspactor_bin.rb')
  end
end
 
if $0 == __FILE__ then
  rb_main_init
  $all_specs, $failed_specs, $pending_specs = [], [], []
  OSX.NSApplicationMain(0, nil)
end