Sha256: 71237e92c05028fb945118bc2b36242136efd48e0f7dc1e3e96dd3377345fe36
Contents?: true
Size: 1.15 KB
Versions: 5
Compression:
Stored size: 1.15 KB
Contents
require 'rubygems' gem 'mocha' require 'ruby-debug' require 'mocha' require 'active-fedora' require "equivalent-xml" begin require 'spec' rescue LoadError gem 'rspec' require 'spec' end ENV["RAILS_ENV"] ||= 'test' RAILS_ENV = ENV["RAILS_ENV"] $:.unshift(File.dirname(__FILE__) + '/../lib') Dir[File.join(File.dirname(__FILE__)+'/../lib/')+'**/*.rb'].each{|x| require x unless x.match(/railtie.rb$/)} $VERBOSE=nil # This loads the Fedora and Solr config info from /config/fedora.yml # You can load it from a different location by passing a file path as an argument. ActiveFedora.init(File.join(File.dirname(__FILE__), "..", "config", "fedora.yml")) Spec::Runner.configure do |config| config.mock_with :mocha end #TEST_FEDORA_URL = 'http://fedoraAdmin:fedoraAdmin@127.0.0.1:8080/fedora' #TEST_SOLR_URL = 'http://127.0.0.1:8080/solr' #Fedora::Repository.register(TEST_FEDORA_URL) #ActiveFedora::SolrService.register(TEST_SOLR_URL) def fixture(file) File.new(File.join(File.dirname(__FILE__), 'fixtures', file)) end def validate_xml(xml, expected_root) root = REXML::Document.new(xml).root root.should_not be_nil root.name.should == expected_root end
Version data entries
5 entries across 5 versions & 1 rubygems