Use Rrspec-core without mocks or expectations

Use rspec-core without rspec-mocks or rspec-expectations

It is most common to use rspec-core with rspec-mocks and rspec-expectations,
and rspec-core will take care of loading those libraries automatically if
available, but rspec-core can be used just fine without either of those
gems installed.Scenarios

  • @unsupported-on-rbx

Use only rspec-core when only it is installedGivenonly rspec-core is installedAnda file named “core_only_spec.rb” with:

RSpec.describe "Only rspec-core is available" do
  it "it fails when an rspec-mocks API is used" do
    dbl = double("MyDouble")

  it "it fails when an rspec-expectations API is used" do
    expect(1).to eq(1)

WhenI runĀ rspec core_only_spec.rbThenthe output should contain “2 examples, 2 failures”