- Features
- Requirements
- Setup
- Usage
- Tests
- Versioning
- Code of Conduct
- Contributions
- License
- History
- Credits
Makes sure block defines a constant and removes the constant after block is done.
To install, type the following:
gem install rspec-matchers-define_constant
Add the following to your Gemfile:
gem "rspec-matchers-define_constant"
RSpec.describe "a block that defines a constant" do
subject do
proc do
Object.const_set "Stuff", 1
end
end
it "defines Stuff" do
expect { subject.call }.to define_constant("Stuff").of_type(Fixnum)
# Stuff is not defined here.
end
end
To test, run:
bundle exec rake
Read Semantic Versioning for details. Briefly, it means:
- Patch (x.y.Z) - Incremented for small, backwards compatible bug fixes.
- Minor (x.Y.z) - Incremented for new, backwards compatible public API enhancements and/or bug fixes.
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
Please note that this project is released with a CODE OF CONDUCT. By participating in this project you agree to abide by its terms.
Read CONTRIBUTING for details.
Copyright (c) 2016 Pooyan Khosravi. Read the LICENSE for details.
Read the CHANGELOG for details. Built with Gemsmith.
Developed by Pooyan Khosravi.