Sha256: 6bf3d107826d97781d22f1f2ea6df1f9b321f6edaab05f429fea102d2991bb79
Contents?: true
Size: 822 Bytes
Versions: 5
Compression:
Stored size: 822 Bytes
Contents
require 'minitest/autorun' require 'minitest/around/spec' 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
5 entries across 5 versions & 1 rubygems