public function testRenderWithOptions()
    {
        $map = $this->getMock('Ivory\\GoogleMap\\Map');
        $map->expects($this->once())->method('getJavascriptVariable')->will($this->returnValue('map'));
        $bound = new Bound();
        $bound->setJavascriptVariable('rectangleBound');
        $bound->setSouthWest(-1.1, -2.1);
        $bound->setNorthEast(1.1, 2.1);
        $rectangle = new Rectangle($bound);
        $rectangle->setJavascriptVariable('rectangle');
        $rectangle->setOptions(array('option1' => 'value1', 'option2' => 'value2'));
        $expected = <<<EOF
rectangle = new google.maps.Rectangle({"map":map,"bounds":rectangleBound,"option1":"value1","option2":"value2"});

EOF;
        $this->assertSame($expected, $this->rectangleHelper->render($rectangle, $map));
    }