spec/spec_helper.rb in kaltura_fu-0.1.3.prel vs spec/spec_helper.rb in kaltura_fu-0.1.3
- old
+ new
@@ -1,10 +1,28 @@
-begin
- require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
-rescue LoadError
- puts "You need to install rspec in your base app"
- exit
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+require 'kaltura_fu'
+require 'spec'
+require 'spec/autorun'
+require 'rubygems'
+require 'kaltura'
+require 'yaml'
+require 'active_support'
+
+Spec::Runner.configure do |config|
+
end
-plugin_spec_dir = File.dirname(__FILE__)
-ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")
-
+class KalturaFuTestConfiguration
+ def self.setup
+ kaltura_yml = File.join(File.dirname(__FILE__),'config','kaltura.yml')
+ KalturaFu.config = YAML.load_file(kaltura_yml).symbolize_keys
+
+ #remove any lingering and possibly incorrect client information
+ KalturaFu.client = nil
+ KalturaFu.client_configuration = nil
+ end
+
+ def self.video
+ File.open(File.join(File.dirname(__FILE__),'config','video.flv'))
+ end
+end
\ No newline at end of file