Sha256: 9d2d6f1c510df6f02d66c18806ceab6653e95047b769c4a687684d464605e508

Contents?: true

Size: 826 Bytes

Versions: 8

Compression:

Stored size: 826 Bytes

Contents

#! /usr/bin/ruby
# encoding: utf-8

require 'minitest/autorun'

describe "InertRecorder"  do
  before do
    require './../lib/y_support/inert_recorder'
  end

  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

8 entries across 8 versions & 1 rubygems

Version Path
y_support-2.4.6 test/inert_recorder_test.rb
y_support-2.4.5 test/inert_recorder_test.rb
y_support-2.4.4 test/inert_recorder_test.rb
y_support-2.1.18 test/inert_recorder_test.rb
y_support-2.1.17 test/inert_recorder_test.rb
y_support-2.1.16 test/inert_recorder_test.rb
y_support-2.1.13 test/inert_recorder_test.rb
y_support-2.1.12 test/inert_recorder_test.rb