Skip to content

Commit

Permalink
Added mspec as a dependency, added a .mspec file so that macruby is u…
Browse files Browse the repository at this point in the history
…sed, added a rakefile to help run specs.
  • Loading branch information
gunn committed Dec 14, 2010
1 parent b376e42 commit e1d8aae
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Rakefile
@@ -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
2 changes: 2 additions & 0 deletions dispatch.gemspec
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions spec/dispatch.mspec
@@ -0,0 +1,3 @@
class MSpecScript
set :target, 'macruby'
end

0 comments on commit e1d8aae

Please sign in to comment.