/passing.mspec

http://github.com/MagLev/maglev · Unknown · 18 lines · 15 code · 3 blank · 0 comment · 0 complexity · 3305f9f4b7f06307a73ae0f9e882849c MD5 · raw file

  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
  6. class MSpecScript
  7. spec_dir = File.dirname(__FILE__) + '/spec/rubyspec/'
  8. conf_file = File.dirname(__FILE__) + '/../svn/tests/rubytst/passingspecs.conf'
  9. # Read the conf file, removing trailing newlines and filter out comments
  10. # and empty lines.
  11. passing_specs = IO.readlines(conf_file).map { |line| "#{spec_dir}#{line.chomp}"}
  12. passing_specs.reject! { |line| line =~ /#{spec_dir}\s*$|#{spec_dir}\s*#/ }
  13. # An ordered list of the directories containing specs to run
  14. set :files, passing_specs
  15. end