Sha256: 99a248f1b0535f93e551e708f38433c30c10fd3c082a53bbcb11f9c6908b7e58

Contents?: true

Size: 967 Bytes

Versions: 47

Compression:

Stored size: 967 Bytes

Contents

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

require 'test/unit'
require 'shoulda'

class YSupportTest < Test::Unit::TestCase
  context "Object" do
    setup do
      require 'y_support/inert_recorder'
    end

    should "have #InertRecorder() constructor" do
      assert_equal InertRecorder, InertRecorder( :bull ).class
    end
  end # context Object
  
  context "InertRecorder" do
    setup do
      require 'y_support/inert_recorder'
    end

    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 # context InertRecorder
end # class InertRecorderTest

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
y_support-2.1.5 test/inert_recorder_test.rb
y_support-2.1.4 test/inert_recorder_test.rb
y_support-2.1.3 test/inert_recorder_test.rb
y_support-2.1.2 test/inert_recorder_test.rb
y_support-2.1.1 test/inert_recorder_test.rb
y_support-2.1.0 test/inert_recorder_test.rb
y_support-2.0.43 test/inert_recorder_test.rb
y_support-2.0.42 test/inert_recorder_test.rb
y_support-2.0.41 test/inert_recorder_test.rb
y_support-2.0.39 test/inert_recorder_test.rb
y_support-2.0.38 test/inert_recorder_test.rb
y_support-2.0.37 test/inert_recorder_test.rb
y_support-2.0.36 test/inert_recorder_test.rb
y_support-2.0.35 test/inert_recorder_test.rb
y_support-2.0.34 test/inert_recorder_test.rb
y_support-2.0.33 test/inert_recorder_test.rb
y_support-2.0.31 test/inert_recorder_test.rb
y_support-2.0.30 test/inert_recorder_test.rb
y_support-2.0.29 test/inert_recorder_test.rb
y_support-2.0.28 test/inert_recorder_test.rb