Fix::Let
Provides
let
method for memoized helper definition.
⚠️ This gem is no longer maintained,
as the let
method was merged in to Fix
since the version 1.0.0.beta4.
Installation
Add this line to your application's Gemfile:
gem 'fix-let'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fix-let
Usage
Given this code:
# duck_spec.rb
require 'fix/let'
class Duck
def swims
'So! Swoosh...'
end
end
Fix.describe Duck.new do
let(:famous_word) { 'So!' }
on :swims do
it { MUST eql "#{famous_word} Swoosh..." }
end
end
The output should look like this:
$ ruby duck_spec.rb
.
Ran 1 tests in 0.000243 seconds
100% compliant - 0 infos, 0 failures, 0 errors
Contact
- Source code: https://github.com/fixrb/fix-let
Versioning
Fix::Let follows Semantic Versioning 2.0.
License
The gem is available as open source under the terms of the MIT License.