Sha256: ffbd3aa32ffb3420f0c2db403b74bc531dfc857eb07e6c93370e2483352ef271

Contents?: true

Size: 633 Bytes

Versions: 1

Compression:

Stored size: 633 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class FooTest < Test::Unit::TestCase
  should "be creatable  without arguments" do
    assert Buckley::Foo.new 
  end  
  
  should "be creatable with :to_foo syntax" do
    assert_equal Buckley::Foo, 1.to_foo.class 
  end
  
  context "An Array with two elements" do
    setup { @array = [2,3] }
    
    should "should know its size to be 0" do
      assert_equal 2, @array.size
    end   
  end  
  
  context "a Foo object" do
    setup { @foo = Buckley::Foo.new }
    
    should "print out nicely" do
      assert_equal "A Foo object", @foo.to_s
    end     
     
 end  
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bbuckley-foo-0.2.1 test/foo_test.rb