rspec / rspec-mocks

RSpec's 'test double' framework, with support for stubbing and mocking
https://rspec.info
MIT License
1.16k stars 358 forks source link

Use true/false for Constant#previously_defined #1397

Closed pirj closed 3 years ago

pirj commented 3 years ago
  1) RSpec::Mocks::Constant.original for a previously defined unstubbed constant indicates it was previously defined
     Failure/Error: it("indicates it was previously defined") { expect(const).to be_previously_defined }
       expected `#<RSpec::Mocks::Constant TestClass::M>.previously_defined?` to return true, got [:m, "TestClass::M"]
     # ./spec/rspec/mocks/mutate_const_spec.rb:446:in `block (4 levels) in <module:Mocks>'