得到
The expect syntax does not support operator matchers,
so you must pass a matcher to `#to`.
对于以前的代码
class_methods.all.should =~ [:bar, :hello]
我想改成
expect(class_methods.all).to =~ [:bar, :hello]
我也试过
expect(class_methods.all).to match [:bar, :hello]
和
expect(class_methods.all).to match ([:bar, :hello])
和
expect(class_methods.all match([:bar, :hello])).to be_true
# this one gives wrong number of arguments