spec/macros4cuke/templating/engine_spec.rb in macros4cuke-0.3.15 vs spec/macros4cuke/templating/engine_spec.rb in macros4cuke-0.3.16

- old
+ new

@@ -208,44 +208,43 @@ end it "should complain when a placeholder is empty or blank" do text_w_empty_arg = sample_template.sub(/userid/, '') msg = %q(An empty or blank argument occurred in 'And I fill in "Username" with "<>"'.) - ->(){ Engine.new text_w_empty_arg }.should - raise_error(Macros4Cuke::EmptyArgumentError, msg) + ->(){ Engine.new text_w_empty_arg }.should raise_error( + Macros4Cuke::EmptyArgumentError, msg) end it "should complain when a placeholder contains an invalid character" do text_w_empty_arg = sample_template.sub(/userid/, 'user%id') - msg = "The invalid sign '%' occurs in the argument/tag 'user%id'." - ->(){ Engine.new text_w_empty_arg }.should - raise_error(Macros4Cuke::InvalidCharError, msg) + msg = "The invalid sign '%' occurs in the argument 'user%id'." + ->(){ Engine.new text_w_empty_arg }.should raise_error( + Macros4Cuke::InvalidCharError, msg) end it "should complain when a section has no closing tag" do # Removing an end of section tag... text_w_open_section = sophisticated_template.sub(/<\/address>/, '') error_message = "Unterminated section <?address>." - ->(){ Engine.new text_w_open_section}.should - raise_error(StandardError, error_message) + ->(){ Engine.new text_w_open_section}.should raise_error( + StandardError, error_message) end it "should complain when a closing tag has no corresponding opening tag" do # Replacing an end of section tag by another... text_w_wrong_end = sophisticated_template.sub(/<\/address>/, '</foobar>') msg = "End of section</foobar> doesn't match current section 'address'." - ->(){ Engine.new text_w_wrong_end }.should - raise_error(StandardError, msg) + ->(){ Engine.new text_w_wrong_end }.should raise_error( + StandardError, msg) end it "should complain when a closing tag is found without opening tag" do # Replacing an end of section tag by another... wrong_end = sophisticated_template.sub(/<\?birthdate>/, '</foobar>') msg = "End of section</foobar> found while no corresponding section is open." - ->(){ Engine.new wrong_end }.should - raise_error(StandardError, msg) + ->(){ Engine.new wrong_end }.should raise_error(StandardError, msg) end end # context context "Provided services" do \ No newline at end of file