Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## new runner
- #!/usr/bin/env ruby
- require 'optparse'
- require 'spec/spec_helper'
- require 'mspec/bin/options'
- opts = SpecOptions.new "run", "", 24, " "
- opts.options.on("-Y", "--verify",
- "Verify that guarded specs pass and fail as expected") { MSpec.set_mode :verify }
- opts.options.on("-O", "--report", "Report guarded specs") { MSpec.set_mode :report }
- patterns = opts.parse
- if patterns.empty?
- puts "No files specified."
- puts opts
- exit
- end
- files = []
- patterns.each do |item|
- stat = File.stat(File.expand_path(item))
- files << item if stat.file?
- files.concat(Dir[item+"/**/*_spec.rb"].sort) if stat.directory?
- end
- MSpec.register_files files
- opts.config.register
- MSpec.process
- ## show me the bacon
- angelo:rubinius brian$ bin/mspec spec/ruby/1.8/core/true/
- .....
- Finished in 0.009817 seconds
- 5 files, 5 examples, 17 expectations, 0 failures, 0 errors
Add Comment
Please, Sign In to add comment