summaryrefslogtreecommitdiff
path: root/qa/qa/scenario/actable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/scenario/actable.rb')
-rw-r--r--qa/qa/scenario/actable.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/qa/qa/scenario/actable.rb b/qa/qa/scenario/actable.rb
new file mode 100644
index 00000000000..6cdbd24780e
--- /dev/null
+++ b/qa/qa/scenario/actable.rb
@@ -0,0 +1,23 @@
+module QA
+ module Scenario
+ module Actable
+ def act(*args, &block)
+ instance_exec(*args, &block)
+ end
+
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+
+ module ClassMethods
+ def perform
+ yield new if block_given?
+ end
+
+ def act(*args, &block)
+ new.act(*args, &block)
+ end
+ end
+ end
+ end
+end