spec/client/template_spec.rb in mirage-3.0.0.alpha.6 vs spec/client/template_spec.rb in mirage-3.0.0.alpha.7

- old
+ new

@@ -64,9 +64,19 @@ template.url.should == template_url template.requests_url.should == requests_url end end + describe 'initialize' do + it 'throws and exception if an endpoint is not supplied as the first parameter' do + expect{Template.new}.to raise_error(ArgumentError) + end + + it 'throws and exception if first argument is not a string' do + expect{Template.new(:endpoint)}.to raise_error(ArgumentError) + end + end + describe 'creating' do json = "reponse json" endpoint = "greeting"