1- require File . dirname ( __FILE__ ) + '/ test_helper'
1+ require ' test_helper'
22
33context "Multiple plugins with multiple hooks" do
44 include PerformJob
@@ -45,7 +45,7 @@ def before_perform1(history)
4545 end
4646 end
4747
48- class ::BeforePerformJob
48+ class ::JobPluginsTestBeforePerformJob
4949 extend BeforePerformPlugin
5050 def self . perform ( history )
5151 history << :perform
@@ -56,7 +56,7 @@ def self.before_perform(history)
5656 end
5757
5858 test "before_perform hooks are executed in order" do
59- result = perform_job ( BeforePerformJob , history = [ ] )
59+ result = perform_job ( JobPluginsTestBeforePerformJob , history = [ ] )
6060 assert_equal true , result , "perform returned true"
6161 assert_equal [ :before_perform , :before_perform1 , :perform ] , history
6262 end
@@ -71,7 +71,7 @@ def after_perform_record_history(history)
7171 end
7272 end
7373
74- class ::AfterPerformJob
74+ class ::JobPluginsTestAfterPerformJob
7575 extend AfterPerformPlugin
7676 def self . perform ( history )
7777 history << :perform
@@ -82,7 +82,7 @@ def self.after_perform(history)
8282 end
8383
8484 test "after_perform hooks are executed in order" do
85- result = perform_job ( AfterPerformJob , history = [ ] )
85+ result = perform_job ( JobPluginsTestAfterPerformJob , history = [ ] )
8686 assert_equal true , result , "perform returned true"
8787 assert_equal [ :perform , :after_perform , :after_perform1 ] , history
8888 end
@@ -111,7 +111,7 @@ def self.perform(history)
111111 assert_equal [ :around_perform_plugin1 , :perform ] , history
112112 end
113113
114- class ::AroundPerformJob
114+ class ::JobPluginsTestAroundPerformJob
115115 extend AroundPerformPlugin1
116116 def self . perform ( history )
117117 history << :perform
@@ -123,7 +123,7 @@ def self.around_perform(history)
123123 end
124124
125125 test "around_perform hooks are executed in order" do
126- result = perform_job ( AroundPerformJob , history = [ ] )
126+ result = perform_job ( JobPluginsTestAroundPerformJob , history = [ ] )
127127 assert_equal true , result , "perform returned true"
128128 assert_equal [ :around_perform , :around_perform_plugin1 , :perform ] , history
129129 end
0 commit comments