Permalink
Browse files

Added mspec as a dependency, added a .mspec file so that macruby is u…

…sed, added a rakefile to help run specs.
  • Loading branch information...
1 parent b376e42 commit e1d8aaed2eee47e6926d59533516d806c6d51f17 @gunn committed Dec 14, 2010
Showing with 20 additions and 0 deletions.
  1. +15 −0 Rakefile
  2. +2 −0 dispatch.gemspec
  3. +3 −0 spec/dispatch.mspec
View
@@ -1,2 +1,17 @@
require 'bundler'
Bundler::GemHelper.install_tasks
+
+namespace :spec do
+ DISPATCH_MSPEC = "./spec/dispatch.mspec"
+ DEFAULT_OPTIONS = "-B #{DISPATCH_MSPEC}"
+
+ def mspec(type, options, env = nil)
+ sh "mspec #{type} #{DEFAULT_OPTIONS} #{ENV['opts']} #{options}"
+ end
+
+ desc "Run all specs. To run a specific file: rake spec:run[spec/queue_spec.rb]"
+ task :run, :file do |t, args|
+ mspec :run, args[:file] || "spec"
+ end
+
+end
View
@@ -13,6 +13,8 @@ Gem::Specification.new do |s|
s.description = %q{Grand Central Dispatch is natively implemented as a C API and runtime engine. This gem provides a MacRuby wrapper around that API and allows Ruby to very easily take advantage of GCD to run tasks in parrallel and do calculations asynchronously with queues automatically mapping to threads as needed.}
s.rubyforge_project = "dispatch"
+
+ s.add_development_dependency "mspec", "~>1.5.0"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
View
@@ -0,0 +1,3 @@
+class MSpecScript
+ set :target, 'macruby'
+end

0 comments on commit e1d8aae

Please sign in to comment.