Sha256: ebf0beef5642d7f8dcf529f2ec824280c4bc818cf17db9a5f91f99bfb9adcbb6
Contents?: true
Size: 817 Bytes
Versions: 4
Compression:
Stored size: 817 Bytes
Contents
require 'minitest/autorun' require 'minitest/around' describe "MiniTest Around" do describe "without around" do it "works w/o defining parameters" do assert true end end describe "without args" do around do |test| $before = true test.call $before = false end it "runs around" do $before.must_equal true end end describe "with single arg" do around { "string" } it "passes string argument" do |name| name.must_equal "string" end describe "nested" do it "string is still around" do |name| name.must_equal "string" end end describe "with multiple args" do around { [ 1, 2 ] } it "passes multiple args" do |a, b| a.must_equal 1 b.must_equal 2 end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
minitest-around-0.1.0.pre | test/around_spec.rb |
minitest-around-0.0.3 | test/around_spec.rb |
minitest-around-0.0.2 | test/around_spec.rb |
minitest-around-0.0.1 | test/around_spec.rb |