spec/spec_helper.rb in mods_display-0.7.1 vs spec/spec_helper.rb in mods_display-0.8.0
- old
+ new
@@ -1,8 +1,13 @@
+ENV['RAILS_ENV'] ||= 'test'
require 'mods_display'
require 'stanford-mods'
require 'capybara'
+require 'rails'
+require 'fake_app'
+require 'rspec/rails'
+require 'mods_display/helpers/record_helper'
Dir["#{File.expand_path('..', __FILE__)}/fixtures/*.rb"].each { |file| require file }
# Load i18n test file.
# We don't have any reliable translations yet so this
# just make sure that we're handling i18n properly.
@@ -22,9 +27,10 @@
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = 'random'
+ config.include Rails.application.routes.url_helpers
end
class TestModel
attr_accessor :modsxml
include ModsDisplay::ModelExtension
mods_xml_source(&:modsxml)