daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Apr 17th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## new runner
  2. #!/usr/bin/env ruby
  3.  
  4. require 'optparse'
  5. require 'spec/spec_helper'
  6. require 'mspec/bin/options'
  7.  
  8. opts = SpecOptions.new "run", "", 24, "   "
  9. opts.options.on("-Y", "--verify",
  10.                 "Verify that guarded specs pass and fail as expected") { MSpec.set_mode :verify }
  11. opts.options.on("-O", "--report", "Report guarded specs") { MSpec.set_mode :report }
  12. patterns = opts.parse
  13.  
  14. if patterns.empty?
  15.   puts "No files specified."
  16.   puts opts
  17.   exit
  18. end
  19.  
  20. files = []
  21. patterns.each do |item|
  22.   stat = File.stat(File.expand_path(item))
  23.   files << item if stat.file?
  24.   files.concat(Dir[item+"/**/*_spec.rb"].sort) if stat.directory?
  25. end
  26.  
  27. MSpec.register_files files
  28. opts.config.register
  29.  
  30. MSpec.process
  31.  
  32.  
  33. ## show me the bacon
  34.  
  35. angelo:rubinius brian$ bin/mspec spec/ruby/1.8/core/true/
  36. .....
  37.  
  38. Finished in 0.009817 seconds
  39.  
  40. 5 files, 5 examples, 17 expectations, 0 failures, 0 errors
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top