Commit 0a7b4ac74b5ee6020894dd20a7267a726f2a2c73

updated support files

Commit diff

.gitignore

 
1*/.DS_STORE
1*/.DS_Store
2.DS_Store
23coverage/*
toggle raw diff

script/spec

 
11#!/usr/bin/env ruby
22$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib"))
33require 'spec'
4::Spec::Runner::CommandLine.run(ARGV, STDERR, STDOUT, true, true)
4exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT))
toggle raw diff

script/spec_server

 
66require 'rbconfig'
77require 'spec'
88require 'optparse'
9specmate = ENV['HOME'] + "/Library/Application\ Support/TextMate/Bundles/RSpec.tmbundle/Support/lib"
10if File.directory?(specmate)
11 $LOAD_PATH.unshift(specmate)
12 require 'text_mate_formatter'
13end
149
1510# This is based on Florian Weber's TDDMate
16
1711module Spec
1812 module Runner
1913 class RailsSpecServer
20 def run(args, stderr, stdout)
21 $stdout = stdout
22 $stderr = stderr
14 def run(argv, stderr, stdout)
15 $stdout = stdout
16 $stderr = stderr
17
18 base = ActiveRecord::Base
19 def base.clear_reloadable_connections!
20 active_connections.each do |name, conn|
21 if conn.requires_reloading?
22 conn.disconnect!
23 active_connections.delete(name)
24 end
25 end
26 end
2327
24 ::Dispatcher.reset_application!
28 if ::Dispatcher.respond_to?(:cleanup_application)
29 ::Dispatcher.cleanup_application
30 elsif ::Dispatcher.respond_to?(:reset_application!)
31 ::Dispatcher.reset_application!
32 end
2533 ::Dependencies.mechanism = :load
2634 require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
2735 load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
28
29 ::Spec::Runner::CommandLine.run(args, stderr, stdout, false, true)
36
37 ::Spec::Runner::CommandLine.run(
38 ::Spec::Runner::OptionParser.parse(
39 argv,
40 $stderr,
41 $stdout
42 )
43 )
3044 end
3145 end
3246 end
5757 ruby = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT']
5858 command_line = [ruby, $0, ARGV].flatten.join(' ')
5959 exec(command_line)
60end
60end
6161
6262def daemonize(pid_file = nil)
6363 return yield if $DEBUG
9797else
9898 exec_server.call
9999end
100
toggle raw diff

spec/rcov.opts

 
1--exclude "spec/*,gems/*"
2--rails
toggle raw diff

stories/all.rb

 
1dir = File.dirname(__FILE__)
2Dir[File.expand_path("#{dir}/**/*.rb")].uniq.each do |file|
3 require file
4end
toggle raw diff

stories/helper.rb

 
1ENV["RAILS_ENV"] = "test"
2require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3require 'spec/rails/story_adapter'
toggle raw diff