spec/spec_helper.rb in io_shuten-0.0.3.dev1 vs spec/spec_helper.rb in io_shuten-0.1.0.dev6
- old
+ new
@@ -2,10 +2,11 @@
require 'simplecov'
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "io_shuten"
+
### MONKEY PATCH raise
RUBY_ENGINE = '(no engine)' unless defined? RUBY_ENGINE
# usage: raise my_instance
@@ -37,7 +38,16 @@
require 'rspec/expectations'
RSpec::Matchers.define :inherit_from do |expected|
match do |actual|
actual.ancestors.include?(expected)
+ end
+end
+
+### Configuration
+
+Rspec.configure do |conf|
+ conf.before(:suite) do
+ REDIS = Redis::Namespace.new("io_shuten/test", :redis => Redis.new) unless defined? REDIS
+ IO_shuten::Redis.redis_clear!
end
end