Mercurial > hg > soundsoftware-site
comparison plugins/redmine_checkout/spec/spec_helper.rb @ 1484:51364c0cd58f redmine-2.4-integration
Merge from live branch. Still need to merge manually in files overridden by plugins.
author | Chris Cannam |
---|---|
date | Wed, 15 Jan 2014 09:59:14 +0000 |
parents | b4b72f1eb644 |
children |
comparison
equal
deleted
inserted
replaced
1464:261b3d9a4903 | 1484:51364c0cd58f |
---|---|
1 ENV['RAILS_ENV'] ||= 'test' | |
2 | |
3 # prevent case where we are using rubygems and test-unit 2.x is installed | |
4 begin | |
5 require 'rubygems' | |
6 gem "test-unit", "~> 1.2.3" | |
7 rescue LoadError | |
8 end | |
9 | |
10 begin | |
11 require "config/environment" unless defined? RAILS_ROOT | |
12 require RAILS_ROOT + '/spec/spec_helper' | |
13 rescue LoadError => error | |
14 puts <<-EOS | |
15 | |
16 You need to install rspec in your Redmine project. | |
17 Please execute the following code: | |
18 | |
19 gem install rspec-rails | |
20 script/generate rspec | |
21 | |
22 EOS | |
23 raise error | |
24 end | |
25 | |
26 Fixtures.create_fixtures File.join(File.dirname(__FILE__), "fixtures"), ActiveRecord::Base.connection.tables | |
27 require File.join(File.dirname(__FILE__), "..", "init.rb") |