parent
90bb29d392
commit
747e49d192
@ -1,3 +1,5 @@ |
||||
Factory.define(:global_role) do |gr| |
||||
gr.name "global_role" |
||||
end |
||||
FactoryGirl.define do |
||||
factory :global_role do |gr| |
||||
gr.name "global_role" |
||||
end |
||||
end |
||||
|
@ -1,4 +1,6 @@ |
||||
Factory.define :principal_role do |pr| |
||||
pr.association :role, :factory => :global_role |
||||
pr.association :principal, :factory => :user |
||||
end |
||||
FactoryGirl.define do |
||||
factory :principal_role do |pr| |
||||
pr.association :role, :factory => :global_role |
||||
pr.association :principal, :factory => :user |
||||
end |
||||
end |
||||
|
@ -1,30 +1,35 @@ |
||||
RAILS_ENV = "test" unless defined? RAILS_ENV |
||||
#RAILS_ENV = "test" unless defined? RAILS_ENV |
||||
|
||||
# prevent case where we are using rubygems and test-unit 2.x is installed |
||||
begin |
||||
require 'rubygems' |
||||
gem "test-unit", "~> 1.2.3" |
||||
rescue LoadError |
||||
end |
||||
#begin |
||||
# require 'rubygems' |
||||
# gem "test-unit", "~> 1.2.3" |
||||
#rescue LoadError |
||||
#end |
||||
|
||||
begin |
||||
#require "config/environment" unless defined? RAILS_ROOT |
||||
require 'spec/spec_helper' |
||||
rescue LoadError => error |
||||
puts <<-EOS |
||||
# begin |
||||
# #require "config/environment" unless defined? RAILS_ROOT |
||||
# require 'spec/spec_helper' |
||||
# rescue LoadError => error |
||||
# puts <<-EOS |
||||
|
||||
You need to install rspec in your Redmine project. |
||||
Please execute the following code: |
||||
# You need to install rspec in your Redmine project. |
||||
# Please execute the following code: |
||||
|
||||
gem install rspec-rails |
||||
script/generate rspec |
||||
# gem install rspec-rails |
||||
# script/generate rspec |
||||
|
||||
EOS |
||||
raise error |
||||
end |
||||
# EOS |
||||
# raise error |
||||
# end |
||||
|
||||
Fixtures.create_fixtures File.join(File.dirname(__FILE__), "fixtures"), ActiveRecord::Base.connection.tables |
||||
require File.expand_path(File.dirname(__FILE__) + '/plugin_spec_helper') |
||||
require 'redmine_factory_girl' |
||||
# Fixtures.create_fixtures File.join(File.dirname(__FILE__), "fixtures"), ActiveRecord::Base.connection.tables |
||||
# require File.expand_path(File.dirname(__FILE__) + 'support/plugin_spec_helper') |
||||
# require 'redmine_factory_girl' |
||||
|
||||
include GlobalRoles::PluginSpecHelper |
||||
# include OpenProject::GlobalRoles::PluginSpecHelper |
||||
|
||||
require 'spec_helper' |
||||
|
||||
require File.join(File.dirname(__FILE__), 'plugin_spec_helper') |
||||
include OpenProject::GlboalRoles::PluginSpecHelper |
||||
|
Loading…
Reference in new issue