Skip to content

Fix regression from simple_stub

gitlab-qa-bot requested to merge fix-symbol-vs-string-conflict into master

Created by: myronmarston

Since introducing simple_stub, this has been broken:

    dbl = double("foo" => 1)
    allow(dbl).to receive("foo").and_return(2)

The receive matcher converts "foo" to :foo, but simple stub was not converting "foo", so we wound up with two method doubles (one for the string, one for the symbol) where we should have had one and things blew up when trying to reset the method doubles.

Merge request reports