Mercurial > hg > soundsoftware-site
annotate plugins/redmine_checkout/spec/spec_helper.rb @ 1621:3a510bf6a9bc
Merge from live branch
author | Chris Cannam |
---|---|
date | Fri, 13 Jul 2018 10:44:33 +0100 |
parents | b4b72f1eb644 |
children |
rev | line source |
---|---|
Chris@16 | 1 ENV['RAILS_ENV'] ||= 'test' |
Chris@16 | 2 |
Chris@16 | 3 # prevent case where we are using rubygems and test-unit 2.x is installed |
Chris@16 | 4 begin |
Chris@16 | 5 require 'rubygems' |
Chris@16 | 6 gem "test-unit", "~> 1.2.3" |
Chris@16 | 7 rescue LoadError |
Chris@16 | 8 end |
Chris@16 | 9 |
Chris@16 | 10 begin |
Chris@16 | 11 require "config/environment" unless defined? RAILS_ROOT |
Chris@16 | 12 require RAILS_ROOT + '/spec/spec_helper' |
Chris@16 | 13 rescue LoadError => error |
Chris@16 | 14 puts <<-EOS |
Chris@16 | 15 |
Chris@16 | 16 You need to install rspec in your Redmine project. |
Chris@16 | 17 Please execute the following code: |
Chris@16 | 18 |
Chris@16 | 19 gem install rspec-rails |
Chris@16 | 20 script/generate rspec |
Chris@16 | 21 |
Chris@16 | 22 EOS |
Chris@16 | 23 raise error |
Chris@16 | 24 end |
Chris@16 | 25 |
Chris@16 | 26 Fixtures.create_fixtures File.join(File.dirname(__FILE__), "fixtures"), ActiveRecord::Base.connection.tables |
Chris@16 | 27 require File.join(File.dirname(__FILE__), "..", "init.rb") |