Guys, I'm trying to do something a little exotic here, using RSpec to test
Objective-C code through MacRuby.
I mean the major problems I already solved (how to load Objective-C into
ruby, install rspec for native macruby...), but in this case I just can't
use the "spec" command, because the ruby command is dispatched directly by
XCode... Im trying this:

   require "rubygems"

require "rspec"

require "rspec/autorun"


RSpec.configure do |config|

    config.mock_with :rspec

end


# Loading all the Ruby project files.

main = File.basename(__FILE__, File.extname(__FILE__))

dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation

Dir.glob(File.join(dir_path, '*_spec.{rb,rbo}')).map { |x| File.basename(x,
File.extname(x)) }.uniq.each do |path|

  if path != main

    require(path)

  end

end

But it's not working... this script just load the spec files using require,
I meant it will work, but it don't...
What Im missing in order to make specs to run after files are loaded?
---
Wilker LĂșcio
http://about.me/wilkerlucio/bio
Kajabi Consultant
+55 81 82556600
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to