require File.expand_path(File.dirname(__FILE__)) + '/helpers.rb' context "a drawable" do setup do @block = Proc.new {} Ray::Drawable.new(&@block) end context "after drawing" do hookup do stub(@block).call (@img = Ray::Image.new(:w => 10, :h => 10)).draw_drawable topic end asserts("the block") { @block }.received(:call) { @img } end end run_tests if __FILE__ == $0