spec/spec_helper.rb in flydata-0.1.10 vs spec/spec_helper.rb in flydata-0.1.11

- old
+ new

@@ -1,10 +1,20 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'active_record' # for Flydata::Heroku require 'protected_attributes' + +# Change FLYDATA_HOME to tempdir +temp_dir_path = Dir.mktmpdir +ENV['FLYDATA_HOME'] = temp_dir_path +# Set dummy flydata_api_host file +File.open(File.join(temp_dir_path, 'flydata_api_host'), 'w') do |f| + f.write('http://0.0.0.0:3000') +end + require 'flydata' + # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}