Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added rake task spec:ci. added svn:executable for bin/mspec. enhanced…

… readability of system command in mspec. added globbing across directories to mspec command.
  • Loading branch information...
commit 03dfae6b896a6b67ac6066e94284d992833afac5 1 parent 9642566
@brixen brixen authored
Showing with 23 additions and 2 deletions.
  1. +16 −0 Rakefile
  2. +6 −1 bin/mspec
  3. +1 −1  spec/mini_rspec.rb
View
16 Rakefile
@@ -50,6 +50,22 @@ task :rebuild => ['build:clean', 'build:shotgun', 'build:compiler', 'build:boots
desc "Build shotgun (the C-code VM)"
task :build => ['build:shotgun']
+namespace :spec do
+ task :ci do
+ begin
+ stat = File.stat("CI-specs")
+ if stat.file?
+ raise "CI-specs is a file. Remove it to run CI specs"
+ elsif stat.directory?
+ sh "svn up CI-specs"
+ end
+ rescue
+ sh("svn co http://code.fallingsnow.net/svn/rubinius/branches/CI-specs")
+ end
+ sh "bin/mspec CI-specs"
+ end
+end
+
namespace :build do
desc "Removes build by-products for shotgun, compiler, and library"
View
7 bin/mspec 100644 → 100755
@@ -76,4 +76,9 @@ patterns.each do |item|
dirs << item if stat.directory?
end
-system %(#{target} -Ispec -rmini_rspec.rb -e '@reporter = #{format}.new; #{dirs.inspect}.each { |d| Dir[d+"/*_spec.rb"].each { |f| load f }}; #{files.inspect}.each { |f| load f }')
+cmd = <<-EOC
+#{target} -Ispec -rmini_rspec.rb -rmini_mock.rb -e '@reporter = #{format}.new;
+#{dirs.inspect}.each { |d| Dir[d+"/**/*_spec.rb"].each { |f| load f }};
+#{files.inspect}.each { |f| load f }'
+EOC
+system cmd
View
2  spec/mini_rspec.rb
@@ -75,7 +75,7 @@ def summary
end
def print_summary
- @out.print "\n\n" + @examples.to_s + " examples, " + @failures.to_s + " failures\n"
+ @out.print "\n" + @examples.to_s + " examples, " + @failures.to_s + " failures\n"
end
def print_failure(i,r)
Please sign in to comment.
Something went wrong with that request. Please try again.