Sha256: dde1ba4edd8df3ead0e813087c526634b7ebc608fe047f58879fd1b1ff70dcac

Contents?: true

Size: 833 Bytes

Versions: 15

Compression:

Stored size: 833 Bytes

Contents

class SpecSuite
  class << self
    def all
      system("ruby #{dir}/core_spec_suite.rb") || raise("Core Spec Suite failed")
      dir = File.dirname(__FILE__)
      require "#{dir}/../lib/erector/rails/rails_version"

      rails_version = Erector::Rails::RAILS_VERSION
      puts "Running rails_spec_suite for Rails version #{rails_version}"

      system("ruby #{dir}/rails_spec_suite.rb") || raise("Failed for version #{rails_version}")
    end

    def core
      run Dir["#{dir}/{erect,erector}/**/*_spec.rb"]
    end

    def rails
      Dir.chdir("#{dir}/rails_root") do
        run Dir["spec/**/*_spec.rb"]
      end
    end

    def run(files)
      files.each do |file|
        require file
      end
    end

    protected
    def dir
      File.dirname(__FILE__)
    end
  end
end

if $0 == __FILE__
  SpecSuite.all
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
pivotal-erector-0.6.0 spec/spec_suite.rb
pivotal-erector-0.6.1 spec/spec_suite.rb
pivotal-erector-0.6.2 spec/spec_suite.rb
pivotal-erector-0.6.3 spec/spec_suite.rb
pivotal-erector-0.6.4 spec/spec_suite.rb
pivotal-erector-0.6.5 spec/spec_suite.rb
pivotal-erector-0.6.6 spec/spec_suite.rb
pivotal-erector-0.6.7 spec/spec_suite.rb
pivotal-erector-0.7.0 spec/spec_suite.rb
erector-0.7.1 spec/spec_suite.rb
erector-0.7.0 spec/spec_suite.rb
erector-0.6.7 spec/spec_suite.rb
erector-0.6.4 spec/spec_suite.rb
erector-0.6.3 spec/spec_suite.rb
erector-0.6.6 spec/spec_suite.rb