Sha256: 5d207395aef1fa04d67d512237f4798dea2a38576e35918664feabd5f9a7e801

Contents?: true

Size: 945 Bytes

Versions: 2

Compression:

Stored size: 945 Bytes

Contents

#!/usr/bin/env ruby
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../vendor/plugins/rspec-rails/lib' # For rspec installed as plugin
require 'rubygems'
require 'optparse'
require 'spec/rails/spec_server'

puts "Loading Rails environment"

ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")

if Rails::VERSION::STRING >= '2.2' && Rails.configuration.cache_classes
  warn <<-MESSAGE

#{'*'*50}

spec_server won't reload your classes if config.cache_classes
is set to true. Please modify environment/test.rb:

    config.cache_classes = false

#{'*'*50}
MESSAGE
end

options = Hash.new
parser = OptionParser.new
parser.on("-d", "--daemon")     {|ignore| options[:daemon] = true }
parser.on("-p", "--pid PIDFILE"){|pid|    options[:pid]    = pid  }
parser.parse!(ARGV)

if options[:daemon]
  ::Spec::Rails::SpecServer.daemonize(options[:pid])
else
  ::Spec::Rails::SpecServer.run
end

puts "Ready"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dchelimsky-rspec-rails-1.1.99.7 generators/rspec/templates/script/spec_server
dchelimsky-rspec-rails-1.1.99.8 generators/rspec/templates/script/spec_server