Sha256: 0887641f12930bcdfda5b599f126caaec018429bfa8f4861bfce133d3c1b3b05

Contents?: true

Size: 618 Bytes

Versions: 2

Compression:

Stored size: 618 Bytes

Contents

require File.join(File.dirname(__FILE__), *%w[.. test_helper])

class ContainerTest < Test::Unit::TestCase
  context "Rendering a container" do
    setup do
      @family = container('family')
      @family.controller = @controller
    end
    
    should "return an empty view if childless" do
      assert_equal "<div id=\"family\"></div>", @family.invoke
    end
    
    should "provide a family picture" do
      @family << mouse_mock('mum')
      @family << mouse_mock('kid')
      assert_equal "<div id=\"family\"><div id=\"mum\">burp!</div>\n<div id=\"kid\">burp!</div></div>", @family.invoke
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
apotomo-0.1.2 test/unit/container_test.rb
apotomo-0.1.1 test/unit/container_test.rb