describe Pipio::AutoReplyMessage, '#to_s' do it 'has the correct sender_screen_name' do expect(auto_reply_message(sender_screen_name: "hello").to_s).to include 'sender="hello"' end it 'has the correct alias' do expect(auto_reply_message(sender_alias: "garner").to_s).to include 'alias="garner"' end it 'has the correct time' do time = Time.now formatted_time = time.xmlschema.sub(/:00$/, "00") expect(auto_reply_message(time: time).to_s).to include %(time="#{formatted_time}") end it 'has the correct body' do body = "hello" styled_body = %(