Sha256: b85682e557e3457976c93099d81152dc39407b02a5d9936dbf75e7f8116dfbd5

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

require 'rubygems'
gem 'mocha'
require 'ruby-debug'
require 'mocha'
require 'ruby-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}
$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

7 entries across 7 versions & 1 rubygems

Version Path
active-fedora-2.2.0 spec/spec_helper.rb
active-fedora-2.1.0 spec/spec_helper.rb
active-fedora-2.0.4 spec/spec_helper.rb
active-fedora-2.0.3 spec/spec_helper.rb
active-fedora-2.0.2 spec/spec_helper.rb
active-fedora-2.0.1 spec/spec_helper.rb
active-fedora-2.0.0 spec/spec_helper.rb