PageRenderTime 19ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/passing.mspec

http://github.com/MagLev/maglev
Unknown | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | 3305f9f4b7f06307a73ae0f9e882849c MD5 | raw file
Possible License(s): LGPL-2.1
 1# -*-ruby-*-
 2# A config file for running mspec that runs all, and only, the files listed
 3# in svn/tests/rubytst/passingspecs.conf.  This is used by the rake tasks.
 4#
 5# Depends on default.mspec also being read
 6class MSpecScript
 7  spec_dir =  File.dirname(__FILE__) + '/spec/rubyspec/'
 8  conf_file = File.dirname(__FILE__) + '/../svn/tests/rubytst/passingspecs.conf'
 9
10  # Read the conf file, removing trailing newlines and filter out comments
11  # and empty lines.
12  passing_specs = IO.readlines(conf_file).map { |line| "#{spec_dir}#{line.chomp}"}
13  passing_specs.reject! { |line| line =~ /#{spec_dir}\s*$|#{spec_dir}\s*#/ }
14
15  # An ordered list of the directories containing specs to run
16  set :files, passing_specs
17
18end