RSpec::Expectations lets you express expected outcomes on an object using an example-based DSL syntax.
This topic gives examples of how to expect test results in RSpec using expect .to
and the many built-in matchers.
This functionality is provided by the rspec-expectations gem.