diff --git a/lib/rspec/parameterized/lazy_arg.rb b/lib/rspec/parameterized/lazy_arg.rb index 15f83f4..392791a 100644 --- a/lib/rspec/parameterized/lazy_arg.rb +++ b/lib/rspec/parameterized/lazy_arg.rb @@ -8,6 +8,12 @@ def initialize(&block) def apply(obj) obj.instance_eval(&@block) end + + def inspect + "#{@block.to_raw_source}" + rescue Parser::SyntaxError + super.inspect + end end end end diff --git a/lib/rspec/parameterized/ref_arg.rb b/lib/rspec/parameterized/ref_arg.rb index baa3d5e..da9de44 100644 --- a/lib/rspec/parameterized/ref_arg.rb +++ b/lib/rspec/parameterized/ref_arg.rb @@ -9,6 +9,10 @@ def initialize(symbol) def apply(obj) obj.send(@symbol) end + + def inspect + "#{@symbol}" + end end end end