Permalink
Browse files

added spec directory, and spec infrastructure

  • Loading branch information...
jkutner committed Mar 14, 2011
1 parent e324abf commit 8d9c36215c346e47fb119fd2db8c8ab37b5d5957
Showing with 73 additions and 41 deletions.
  1. +1 −41 Rakefile
  2. +5 −0 spec/coercion_spec.rb
  3. +4 −0 spec/spec.opts
  4. +1 −0 spec/spec_helper.rb
  5. +32 −0 tasks/documentation.rake
  6. +21 −0 tasks/rspec.rake
  7. +9 −0 tasks/test.rake
View
@@ -53,15 +53,8 @@ CLEAN.include("pkg", "rdoc")
task :default => [ :clean, :repackage ]
FileList['tasks/**/*.rake'].each { |task| import task }
#
# TESTING
Rake::TestTask.new(:test) do |t|
t.libs << "tests"
t.test_files = FileList['tests/test.rb']
t.verbose = true
end
#
# PACKAGING
@@ -87,36 +80,3 @@ Rake::PackageTask.new(spec.name, spec.version) do |pkg|
end
end
#
# DOCUMENTATION
#ALLISON=`allison --path`
#ALLISON="/Library/Ruby/Gems/1.8/gems/allison-2.0.3/lib/allison.rb"
Rake::RDocTask.new do |rd|
#rd.main = "README.txt"
#rd.rdoc_dir = "html/rufus-verbs"
rd.rdoc_files.include(
"LICENSE.txt",
"lib/**/*.rb")
rd.title = "ruleby rdoc"
rd.options << '-N' # line numbers
rd.options << '-S' # inline source
#rd.template = ALLISON if File.exist?(ALLISON)
end
#
# WEBSITE
#task :upload_website => [ :clean, :rdoc ] do
# account = "whoever@rubyforge.org"
# webdir = "/var/www/gforge-projects/ruleby"
# sh "rsync -azv -e ssh html/source #{account}:#{webdir}/"
#end
View
@@ -0,0 +1,5 @@
require 'spec_helper'
describe Ruleby::Core::Engine do
end
View
@@ -0,0 +1,4 @@
--colour
--loadby random
--format profile
--backtrace
View
@@ -0,0 +1 @@
require 'ruleby'
View
@@ -0,0 +1,32 @@
#
# DOCUMENTATION
#ALLISON=`allison --path`
#ALLISON="/Library/Ruby/Gems/1.8/gems/allison-2.0.3/lib/allison.rb"
Rake::RDocTask.new do |rd|
#rd.main = "README.txt"
#rd.rdoc_dir = "html/rufus-verbs"
rd.rdoc_files.include(
"LICENSE.txt",
"lib/**/*.rb")
rd.title = "ruleby rdoc"
rd.options << '-N' # line numbers
rd.options << '-S' # inline source
#rd.template = ALLISON if File.exist?(ALLISON)
end
#
# WEBSITE
#task :upload_website => [ :clean, :rdoc ] do
# account = "whoever@rubyforge.org"
# webdir = "/var/www/gforge-projects/ruleby"
# sh "rsync -azv -e ssh html/source #{account}:#{webdir}/"
#end
View
@@ -0,0 +1,21 @@
begin
require 'spec'
rescue LoadError
require 'rubygems'
require 'spec'
end
begin
require 'spec/rake/spectask'
rescue LoadError
puts <<-EOS
To use rspec for testing you must install rspec gem:
gem install rspec
EOS
exit(0)
end
desc "Run the specs under spec/models"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end
View
@@ -0,0 +1,9 @@
#
# TESTING
Rake::TestTask.new(:test) do |t|
t.libs << "tests"
t.test_files = FileList['tests/test.rb']
t.verbose = true
end

0 comments on commit 8d9c362

Please sign in to comment.