Fix::Let

Build Status Code Climate Gem Version Inline docs Documentation

Provides let method for memoized helper definition.

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

Rubies

Versioning

Fix::Let follows Semantic Versioning 2.0.

License

The gem is available as open source under the terms of the MIT License.


This project is sponsored by:
Sashite