I'm running a bunch of data-driven specs, and the expected data is in different classes (because I have to use Regexps sometimes, because the output string changes each time but always follows a specific format).

An expression that works perfectly to check them all is Ruby's case equality operator, `===`. The problem is that it works backwards compared to most Ruby expressions, and sometimes the operation is asymmetrical:

```
/rgx a/ === b # equivalent to b =~ /rgx a/
ClassA  === b # equivalent to b.is_a? ClassA

```

In the context of my specs, this means I have to put the operands the wrong way round:

```
[Class, /regex/, 'string'].each do |expected_data|
  it { expect(expected_data).to be === actual_data }
end

```

And this leads to incorrect failure messages:

```
expected: === "Actual data"
     got:     "Expected data"

```

Is there a way to reverse **either** the `===` operator **or** the `expect` syntax?