spec/helpers/jelly_helper_spec.rb in pivotal-jelly-0.3.5 vs spec/helpers/jelly_helper_spec.rb in pivotal-jelly-0.4.0

- old
+ new

@@ -41,8 +41,14 @@ helper.attach_javascript_component("MyComponent", 'arg1', 'arg2', 'arg3') expected_args = ['arg1','arg2','arg3'].to_json assigns[:content_for_javascript].should == "page.attach(MyComponent, #{expected_args});" end + it "adds a call to page.attach in the javascript_on_ready content" do + helper.attach_javascript_component_on_ready("MyComponent", 'arg1', 'arg2', 'arg3') + expected_args = ['arg1','arg2','arg3'].to_json + assigns[:content_for_javascript_on_ready].should == "page.attach(MyComponent, #{expected_args});" + end + end end \ No newline at end of file