File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
require_relative "table_syntax/version"
4
- require 'binding_of_caller'
5
4
require 'rspec/parameterized/table'
5
+ require 'binding_ninja'
6
6
7
7
module RSpec
8
8
module Parameterized
9
9
module TableSyntaxImplement
10
- def |( other )
11
- where_binding = binding . of_caller ( 1 ) # get where block binding
12
- caller_instance = eval ( "self" , where_binding ) # get caller instance (ExampleGroup)
10
+ extend BindingNinja
11
+
12
+ def |( where_binding , other )
13
+ caller_instance = where_binding . receiver # get caller instance (ExampleGroup)
13
14
14
15
if caller_instance . instance_variable_defined? ( :@__parameter_table )
15
16
table = caller_instance . instance_variable_get ( :@__parameter_table )
@@ -23,6 +24,7 @@ def |(other)
23
24
row . add_param ( other )
24
25
table
25
26
end
27
+ auto_inject_binding :|
26
28
end
27
29
28
30
module TableSyntax
You can’t perform that action at this time.
0 commit comments