Concat double quotes with String in Ruby Concat double quotes with String in Ruby ruby ruby

Concat double quotes with String in Ruby


Probably you mean:

expectedValue = "\""+expectedValue+"\""

or more in ruby style:

expectedValue = "\"#{expectedValue}\""


You can use %Q, or simply %

expectedValue = %Q{"#{expectedValue}"}expectedValue = %|"#{expectedValue}"|

Reference: String literals