Sha256: f9dcd3dfb5aad74a2b7dd478e5b318e610159153be3582e5d2c36cb3efc63fb6

Contents?: true

Size: 1.2 KB

Versions: 20

Compression:

Stored size: 1.2 KB

Contents

ENV["environment"] ||= "test"

module Hydra
  # Stubbing Hydra.config[:policy_aware] so Hydra::PolicyAwareAbility will be loaded for tests.
  def self.config
    {:permissions=>{:policy_aware => true}}
  end
end


$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/
  require 'simplecov'
  require 'simplecov-rcov'

  SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
  SimpleCov.start
end

require 'rspec/autorun'
require 'hydra-access-controls'
require 'support/mods_asset'
require 'support/solr_document'
require "support/user"
require "factory_girl"
require "factories"

require 'support/blacklight'
require 'support/rails'
Object.logger = Logger.new(File.expand_path('../test.log', __FILE__))

# Since we're not doing a Rails Engine test, we have to load these classes manually:
require_relative '../app/models/role_mapper'
require_relative '../app/models/ability'



RSpec.configure do |config|

end

# Stubbing a deprecated class/method so it won't mess up tests.
class Hydra::SuperuserAttributes
 cattr_accessor :silenced
end

# Stubbing Devise
class Devise
  def self.authentication_keys
    ["uid"]
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
hydra-access-controls-5.4.1 spec/spec_helper.rb
hydra-access-controls-6.0.0.rc3 spec/spec_helper.rb
hydra-access-controls-6.0.0.rc2 spec/spec_helper.rb
hydra-access-controls-6.0.0.rc1 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre8 spec/spec_helper.rb
hydra-access-controls-5.4.0 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre7 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre6 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre5 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre4 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre3 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre2 spec/spec_helper.rb
hydra-access-controls-6.0.0.pre1 spec/spec_helper.rb
hydra-access-controls-5.4.0.pre1 spec/spec_helper.rb
hydra-access-controls-5.3.0 spec/spec_helper.rb
hydra-access-controls-5.2.0 spec/spec_helper.rb
hydra-access-controls-5.1.0 spec/spec_helper.rb
hydra-access-controls-5.0.1 spec/spec_helper.rb
hydra-access-controls-5.0.0 spec/spec_helper.rb
hydra-access-controls-5.0.0.rc1 spec/spec_helper.rb