Path: | merb-core/lib/merb-core/test/run_spec.rb |
Last Update: | Tue Jul 28 08:32:52 +0200 2009 |
# File merb-core/lib/merb-core/test/run_spec.rb, line 23 23: def run_spec(spec, base_dir) 24: 25: $VERBOSE = nil 26: err, out = StringIO.new, StringIO.new 27: def out.tty?() true end 28: options = Spec::Runner::OptionParser.parse(??(#{spec} -fs --color), err, out) 29: options.filename_pattern = File.expand_path(spec) 30: failure = ! Spec::Runner::CommandLine.run(options) 31: File.open(base_dir / "results" / "#{File.basename(spec)}_out", "w") do |file| 32: file.puts out.string 33: end 34: File.open(base_dir / "results" / "#{File.basename(spec)}_err", "w") do |file| 35: file.puts err.string 36: end 37: exit!(failure ? -1 : 0) 38: end