From 2797c632747a135c10faabd930f3fa9a364944c0 Mon Sep 17 00:00:00 2001 From: Katsuya HIDAKA Date: Sun, 8 Jan 2017 04:46:31 +0900 Subject: [PATCH] Use factory_girl --- Gemfile | 4 ++++ test/test_helper.rb | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index dc21a36..0592cf9 100644 --- a/Gemfile +++ b/Gemfile @@ -1 +1,5 @@ gem 'icalendar', '>= 2.0.0' + +group :test do + gem 'factory_girl' +end diff --git a/test/test_helper.rb b/test/test_helper.rb index 54685d3..95f7462 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,2 +1,12 @@ # Load the Redmine helper require File.expand_path(File.dirname(__FILE__) + '/../../../test/test_helper') + +Dir[AddToCalendar.root.join('test/factories/*.rb')].each { |f| require f } + +module AddToCalendar + module TestHelper + include FactoryGirl::Syntax::Methods + end +end + +Redmine::IntegrationTest.send :include, AddToCalendar::TestHelper