Permalink
Browse files

Also merge the specs into the MacRuby repo.

  • Loading branch information...
1 parent cbad60c commit 75ec7970e6d3b880bd0a2363939d1e85adbce49d @alloy committed Jul 4, 2010
Showing with 22 additions and 11 deletions.
  1. +10 −7 Rakefile
  2. +12 −4 spec/spec_helper.rb
View
@@ -33,16 +33,19 @@ namespace :macruby do
desc "Merge source into the MacRuby repo"
task :merge do
if (repo = ENV['macruby_repo']) && File.exist?(repo)
- bin = File.join(repo, 'bin/irb')
- lib = File.join(repo, 'lib')
+ bin = File.join(repo, 'bin/irb')
+ lib = File.join(repo, 'lib')
+ spec = File.join(repo, 'spec/dietrb')
- rm_f bin
- rm_f File.join(lib, 'irb.rb')
+ rm_f bin
+ rm_f File.join(lib, 'irb.rb')
rm_rf File.join(lib, 'irb')
+ rm_rf spec
- cp 'bin/dietrb', bin
- cp 'lib/irb.rb', lib
- cp_r 'lib/irb', lib
+ cp 'bin/dietrb', bin
+ cp 'lib/irb.rb', lib
+ cp_r 'lib/irb', lib
+ cp_r 'spec', spec
else
puts "[!] Set the `macruby_repo' env variable to point to the MacRuby repo checkout"
exit 1
View
@@ -1,9 +1,17 @@
-require 'rubygems'
-require 'mspec'
+unless defined?(MSpec)
+ require 'rubygems'
+ require 'mspec'
+end
ENV['SPECCING'] = 'true'
-ROOT = File.expand_path('../../', __FILE__)
+root = File.expand_path('../../', __FILE__)
+if File.basename(root) == 'spec'
+ # running from the MacRuby repo
+ ROOT = File.expand_path('../../../', __FILE__)
+else
+ ROOT = root
+end
$:.unshift File.join(ROOT, 'lib')
-require 'irb'
+require 'irb'

0 comments on commit 75ec797

Please sign in to comment.