Sha256: da7565545c4d299cf09088c9f6d26bf30d09b475d440f5592cb5602a8d25b666
Contents?: true
Size: 819 Bytes
Versions: 3
Compression:
Stored size: 819 Bytes
Contents
#! /usr/bin/ruby # encoding: utf-8 require 'minitest/autorun' require_relative '../../lib/y_support/misc/inert_recorder' describe "InertRecorder" do describe "Object" do it "should have #InertRecorder() constructor" do assert_equal InertRecorder, InertRecorder( :bull ).class end end describe "InertRecorder" do it "should InertRecorder exist and comply" do n = InertRecorder.new assert_equal [true, false], [n.present?, n.blank?] assert_respond_to InertRecorder.new, :arbitrary_message n = InertRecorder.new :x, :y n.arbitrary_message( :a, :b ) { "hello" } assert_equal [:x, :y], n.init_args assert_equal [ :arbitrary_message, [:a, :b] ], n.recorded_messages[0][0..1] assert_equal "hello", n.recorded_messages[0][2].call end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
y_support-2.5.3 | test/misc/inert_recorder_test.rb |
y_support-2.5.2 | test/misc/inert_recorder_test.rb |
y_support-2.5.1 | test/misc/inert_recorder_test.rb |