Permalink
Browse files

Adding spec folder back in.

git-svn-id: svn://svn.roundhaus.com/steelpixel/signal/trunk@66 c8df4723-973c-463a-b466-deb924a697da
  • Loading branch information...
1 parent 2cdf731 commit e61d2fd9cba463c0185e8db3105fa517bb288f33 josh committed Oct 7, 2007
Showing with 41 additions and 7 deletions.
  1. +1 −1 script/spec
  2. +4 −6 script/spec_server
  3. +6 −0 spec/spec.opts
  4. +23 −0 spec/spec_helper.rb
  5. +4 −0 stories/all.rb
  6. +3 −0 stories/helper.rb
View
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib"))
require 'spec'
-::Spec::Runner::CommandLine.run(ARGV, STDERR, STDOUT, true, true)
+exit ::Spec::Runner::CommandLine.run(ARGV, STDERR, STDOUT)
View
@@ -9,24 +9,23 @@ require 'optparse'
specmate = ENV['HOME'] + "/Library/Application\ Support/TextMate/Bundles/RSpec.tmbundle/Support/lib"
if File.directory?(specmate)
$LOAD_PATH.unshift(specmate)
- require 'text_mate_formatter'
+ require 'spec/mate/text_mate_formatter'
end
# This is based on Florian Weber's TDDMate
-
module Spec
module Runner
class RailsSpecServer
def run(args, stderr, stdout)
- $stdout = stdout
- $stderr = stderr
+ $stdout = stdout
+ $stderr = stderr
::Dispatcher.reset_application!
::Dependencies.mechanism = :load
require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
- ::Spec::Runner::CommandLine.run(args, stderr, stdout, false, true)
+ ::Spec::Runner::CommandLine.run(args, stderr, stdout)
end
end
end
@@ -83,4 +82,3 @@ if options[:daemon]
else
exec_server.call
end
-
View
@@ -0,0 +1,6 @@
+--colour
+--format
+progress
+--loadby
+mtime
+--reverse
View
@@ -0,0 +1,23 @@
+# This file is copied to ~/spec when you run 'ruby script/generate rspec'
+# from the project root directory.
+ENV["RAILS_ENV"] = "test"
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
+require 'spec/rails'
+
+Spec::Runner.configure do |config|
+ config.use_transactional_fixtures = true
+ config.use_instantiated_fixtures = false
+ config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
+
+ # You can declare fixtures for each behaviour like this:
+ # describe "...." do
+ # fixtures :table_a, :table_b
+ #
+ # Alternatively, if you prefer to declare them only once, you can
+ # do so here, like so ...
+ #
+ # config.global_fixtures = :table_a, :table_b
+ #
+ # If you declare global fixtures, be aware that they will be declared
+ # for all of your examples, even those that don't use them.
+end
View
@@ -0,0 +1,4 @@
+dir = File.dirname(__FILE__)
+Dir[File.expand_path("#{dir}/**/*.rb")].uniq.each do |file|
+ require file
+end
View
@@ -0,0 +1,3 @@
+ENV["RAILS_ENV"] = "test"
+require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
+require 'spec/rails/story_adapter'

0 comments on commit e61d2fd

Please sign in to comment.