Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

minitest-bang

Build Status Code Climate Coverage Status

Provides the let! method to minitest spec, similar to the RSpec method of the same name.

Install

gem install minitest-bang

or add the following line to Gemfile:

gem 'minitest-bang', require: false

and run bundle install from your shell.

Then in your test helper, after requiring minitest/autorun:

require 'minitest/bang'

Supported Minitest versions

Currently, minitest-bang supports minitest 4.7.5 through 5.4.0

Usage

You use it just like you would let, except the ones you define with let! are automatically invoked right before your before block gets executed:

  describe User do
    let!(:user1) { create :user }

    before do
      User.count.must_equal 1
    end

    it "has one user without referencing user1" do
      User.count.must_equal 1
    end
  end

About

Provides the let! method to minitest spec, similar to the RSpec method of the same name.

Resources

Packages

No packages published
You can’t perform that action at this time.