This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
正規表現をスチューブするにはどうすればよいですか? 例えば
# somewhere deep in the code
reg = Regexp.new("foo bar")
res = reg.match string
# somewhere in rspec
reg = Regexp.new("foo bar")
reg.stub(:match).with(string).and_return "rspec_res" #doesn't work