spec/spec.rb in remix-stash-0.9.6 vs spec/spec.rb in remix-stash-1.0.0
- old
+ new
@@ -1,10 +1,21 @@
-require 'rubygems'
-require 'test/unit'
-require 'shoulda'
+#!/usr/bin/env ruby
-$LOAD_PATH << File.dirname(__FILE__) + '/../lib'
-require 'remix/stash'
+if __FILE__ == $0
+ base = File.dirname(__FILE__)
+ Dir[base + '/*_spec.rb'].each {|f| require f}
+else
+ require 'rubygems'
+ require 'test/unit'
+ require 'shoulda'
-Spec = Test::Unit::TestCase
+ load File.dirname(__FILE__) + '/support/rails/config/environment.rb'
+ ENV['MEMCACHED_SERVERS'] = 'localhost:11211'
+ ENV['MEMCACHED_NAMESPACE'] = 'spec'
-include Remix
+ $LOAD_PATH << File.dirname(__FILE__) + '/../lib'
+ require 'remix/stash'
+
+ Spec = Test::Unit::TestCase
+
+ include Remix
+end
\ No newline at end of file