This project is archived and is in readonly mode.

#4022 ✓committed
David Chelimsky

generated mailer test failure

Reported by David Chelimsky | February 21st, 2010 @ 04:56 PM | in 3.0.2

As of a7b78e86b3b78cf4f461cd372d914ff3a6295c1b (Sun Feb 21 14:40:48 2010 +0100), if you cd up one directory from the rails repo and run the following:

ruby rails/railties/bin/rails example_app --dev
cd example_app
rake db:migrate
rake db:test:prepare
script/rails g mailer Notifications signup
rake test

... you'll see an error message like this:

Started
F
Finished in 0.289269 seconds.

  1) Failure:
test_signup(NotificationsTest)
    []:
<#<Mail::Message:0x1031e8a30
 @body=
  #<Mail::Body:0x1031ae920
   @boundary=nil,
   @charset="US-ASCII",
   @encoding=nil,
   @epilogue=nil,
   @part_sort_order=["text/plain", "text/enriched", "text/html"],
   @parts=[],
   @preamble=nil,
   @raw_source=
    "Notifications#signup\n\nHi, find me in app/views/notifications/signup\n">,
 @delivery_handler=nil,
 @delivery_method=
  #<Mail::SMTP:0x1031e8968
   @settings=
    {:domain=>"localhost.localdomain",
     :port=>25,
     :password=>nil,
     :address=>"localhost",
     :user_name=>nil,
     :enable_starttls_auto=>true,
     :authentication=>nil}>,
 @delivery_notification_observers=[],
 @header=
  #<Mail::Header:0x1031e8468
   @fields=
    [#<Mail::Field:0x1031ae5b0
      @field=
       #<Mail::DateField:0x1031ad548
        @element=nil,
        @length=nil,
        @name="Date",
        @tree=nil,
        @value="Sun, 21 Feb 2010 10:54:15 -0600">>,
     #<Mail::Field:0x1031c53c8
      @field=
       #<Mail::FromField:0x1031c4e78
        @element=nil,
        @groups={},
        @length=nil,
        @name="From",
        @tree=
         #<Mail::AddressList:0x1031c4cc0
          @address_nodes=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "from@example.com" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "from" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "from":
      SyntaxNode+LocalDotAtomText0 offset=0, "from" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "from":
          SyntaxNode offset=0, "f"
          SyntaxNode offset=1, "r"
          SyntaxNode offset=2, "o"
          SyntaxNode offset=3, "m"
    SyntaxNode+CFWS1 offset=4, "":
      SyntaxNode offset=4, ""
      SyntaxNode offset=4, ""
  SyntaxNode offset=4, "@"
  SyntaxNode+DotAtom0 offset=5, "example.com" (dot_atom_text):
    SyntaxNode+CFWS1 offset=5, "":
      SyntaxNode offset=5, ""
      SyntaxNode offset=5, ""
    SyntaxNode offset=5, "example.com":
      SyntaxNode+DotAtomText0 offset=5, "example." (domain_text):
        SyntaxNode offset=5, "example":
          SyntaxNode offset=5, "e"
          SyntaxNode offset=6, "x"
          SyntaxNode offset=7, "a"
          SyntaxNode offset=8, "m"
          SyntaxNode offset=9, "p"
          SyntaxNode offset=10, "l"
          SyntaxNode offset=11, "e"
        SyntaxNode offset=12, "."
      SyntaxNode+DotAtomText0 offset=13, "com" (domain_text):
        SyntaxNode offset=13, "com":
          SyntaxNode offset=13, "c"
          SyntaxNode offset=14, "o"
          SyntaxNode offset=15, "m"
        SyntaxNode offset=16, ""
    SyntaxNode+CFWS1 offset=16, "":
      SyntaxNode offset=16, ""
      SyntaxNode offset=16, ""],
          @addresses=
           [#<Mail::Address:2173135940 Address: |from@example.com| >],
          @group_recipients=[],
          @individual_recipients=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "from@example.com" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "from" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "from":
      SyntaxNode+LocalDotAtomText0 offset=0, "from" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "from":
          SyntaxNode offset=0, "f"
          SyntaxNode offset=1, "r"
          SyntaxNode offset=2, "o"
          SyntaxNode offset=3, "m"
    SyntaxNode+CFWS1 offset=4, "":
      SyntaxNode offset=4, ""
      SyntaxNode offset=4, ""
  SyntaxNode offset=4, "@"
  SyntaxNode+DotAtom0 offset=5, "example.com" (dot_atom_text):
    SyntaxNode+CFWS1 offset=5, "":
      SyntaxNode offset=5, ""
      SyntaxNode offset=5, ""
    SyntaxNode offset=5, "example.com":
      SyntaxNode+DotAtomText0 offset=5, "example." (domain_text):
        SyntaxNode offset=5, "example":
          SyntaxNode offset=5, "e"
          SyntaxNode offset=6, "x"
          SyntaxNode offset=7, "a"
          SyntaxNode offset=8, "m"
          SyntaxNode offset=9, "p"
          SyntaxNode offset=10, "l"
          SyntaxNode offset=11, "e"
        SyntaxNode offset=12, "."
      SyntaxNode+DotAtomText0 offset=13, "com" (domain_text):
        SyntaxNode offset=13, "com":
          SyntaxNode offset=13, "c"
          SyntaxNode offset=14, "o"
          SyntaxNode offset=15, "m"
        SyntaxNode offset=16, ""
    SyntaxNode+CFWS1 offset=16, "":
      SyntaxNode offset=16, ""
      SyntaxNode offset=16, ""]>,
        @value="from@example.com">>,
     #<Mail::Field:0x1031d1d80
      @field=
       #<Mail::ToField:0x1031cf990
        @element=nil,
        @groups={},
        @length=nil,
        @name="To",
        @tree=
         #<Mail::AddressList:0x1031cf580
          @address_nodes=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "to@example.org" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "to" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "to":
      SyntaxNode+LocalDotAtomText0 offset=0, "to" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "to":
          SyntaxNode offset=0, "t"
          SyntaxNode offset=1, "o"
    SyntaxNode+CFWS1 offset=2, "":
      SyntaxNode offset=2, ""
      SyntaxNode offset=2, ""
  SyntaxNode offset=2, "@"
  SyntaxNode+DotAtom0 offset=3, "example.org" (dot_atom_text):
    SyntaxNode+CFWS1 offset=3, "":
      SyntaxNode offset=3, ""
      SyntaxNode offset=3, ""
    SyntaxNode offset=3, "example.org":
      SyntaxNode+DotAtomText0 offset=3, "example." (domain_text):
        SyntaxNode offset=3, "example":
          SyntaxNode offset=3, "e"
          SyntaxNode offset=4, "x"
          SyntaxNode offset=5, "a"
          SyntaxNode offset=6, "m"
          SyntaxNode offset=7, "p"
          SyntaxNode offset=8, "l"
          SyntaxNode offset=9, "e"
        SyntaxNode offset=10, "."
      SyntaxNode+DotAtomText0 offset=11, "org" (domain_text):
        SyntaxNode offset=11, "org":
          SyntaxNode offset=11, "o"
          SyntaxNode offset=12, "r"
          SyntaxNode offset=13, "g"
        SyntaxNode offset=14, ""
    SyntaxNode+CFWS1 offset=14, "":
      SyntaxNode offset=14, ""
      SyntaxNode offset=14, ""],
          @addresses=[#<Mail::Address:2173132540 Address: |to@example.org| >],
          @group_recipients=[],
          @individual_recipients=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "to@example.org" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "to" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "to":
      SyntaxNode+LocalDotAtomText0 offset=0, "to" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "to":
          SyntaxNode offset=0, "t"
          SyntaxNode offset=1, "o"
    SyntaxNode+CFWS1 offset=2, "":
      SyntaxNode offset=2, ""
      SyntaxNode offset=2, ""
  SyntaxNode offset=2, "@"
  SyntaxNode+DotAtom0 offset=3, "example.org" (dot_atom_text):
    SyntaxNode+CFWS1 offset=3, "":
      SyntaxNode offset=3, ""
      SyntaxNode offset=3, ""
    SyntaxNode offset=3, "example.org":
      SyntaxNode+DotAtomText0 offset=3, "example." (domain_text):
        SyntaxNode offset=3, "example":
          SyntaxNode offset=3, "e"
          SyntaxNode offset=4, "x"
          SyntaxNode offset=5, "a"
          SyntaxNode offset=6, "m"
          SyntaxNode offset=7, "p"
          SyntaxNode offset=8, "l"
          SyntaxNode offset=9, "e"
        SyntaxNode offset=10, "."
      SyntaxNode+DotAtomText0 offset=11, "org" (domain_text):
        SyntaxNode offset=11, "org":
          SyntaxNode offset=11, "o"
          SyntaxNode offset=12, "r"
          SyntaxNode offset=13, "g"
        SyntaxNode offset=14, ""
    SyntaxNode+CFWS1 offset=14, "":
      SyntaxNode offset=14, ""
      SyntaxNode offset=14, ""]>,
        @value="to@example.org">>,
     #<Mail::Field:0x10311d510
      @field=
       #<Mail::UnstructuredField:0x1030c5d60
        @element=nil,
        @length=nil,
        @name="message-id",
        @tree=nil,
        @value="<>">>,
     #<Mail::Field:0x1031d4260
      @field=
       #<Mail::SubjectField:0x1031d3ba8
        @element=nil,
        @length=15,
        @name="Subject",
        @tree=nil,
        @value="Signup">>,
     #<Mail::Field:0x1031da408
      @field=
       #<Mail::MimeVersionField:0x1031d9a08
        @element=
         #<Mail::MimeVersionElement:0x1031d9850 @major="1", @minor="0">,
        @length=nil,
        @name="Mime-Version",
        @tree=nil,
        @value="1.0">>,
     #<Mail::Field:0x1031e7658
      @field=
       #<Mail::ContentTypeField:0x1031e73d8
        @element=
         #<Mail::ContentTypeElement:0x1031e7180
          @main_type="text",
          @parameters=[{"charset"=>"utf-8"}],
          @sub_type="plain">,
        @length=nil,
        @main_type="text",
        @name="Content-Type",
        @parameters={"charset"=>"utf-8"},
        @sub_type="plain",
        @tree=nil,
        @value="text/plain; charset=utf-8">>,
     #<Mail::Field:0x1030f3cd8
      @field=
       #<Mail::ContentTransferEncodingField:0x1030f2c98
        @element=nil,
        @length=nil,
        @name="Content-Transfer-Encoding",
        @tree=nil,
        @value="7bit">>],
   @raw_source="">,
 @html_part=nil,
 @perform_deliveries=true,
 @raise_delivery_errors=true,
 @raw_source="",
 @text_part=nil>> expected but was
<#<Mail::Message:0x103196f28
 @body=
  #<Mail::Body:0x1031357a0
   @boundary=nil,
   @charset="US-ASCII",
   @encoding=nil,
   @epilogue=nil,
   @part_sort_order=["text/plain", "text/enriched", "text/html"],
   @parts=[],
   @preamble=nil,
   @raw_source=
    "Notifications#signup\n\nHi, find me in app/views/notifications/signup\n">,
 @delivery_handler=Notifications,
 @delivery_method=#<Mail::TestMailer:0x103125968 @settings={}>,
 @delivery_notification_observers=[],
 @header=
  #<Mail::Header:0x103196960
   @fields=
    [#<Mail::Field:0x1030e8338
      @field=
       #<Mail::DateField:0x1030e7668
        @element=nil,
        @length=nil,
        @name="Date",
        @tree=nil,
        @value="Sun, 21 Feb 2010 10:54:15 -0500">>,
     #<Mail::Field:0x103179888
      @field=
       #<Mail::FromField:0x103179270
        @element=nil,
        @groups={},
        @length=nil,
        @name="From",
        @tree=
         #<Mail::AddressList:0x1031790e0
          @address_nodes=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "from@example.com" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "from" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "from":
      SyntaxNode+LocalDotAtomText0 offset=0, "from" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "from":
          SyntaxNode offset=0, "f"
          SyntaxNode offset=1, "r"
          SyntaxNode offset=2, "o"
          SyntaxNode offset=3, "m"
    SyntaxNode+CFWS1 offset=4, "":
      SyntaxNode offset=4, ""
      SyntaxNode offset=4, ""
  SyntaxNode offset=4, "@"
  SyntaxNode+DotAtom0 offset=5, "example.com" (dot_atom_text):
    SyntaxNode+CFWS1 offset=5, "":
      SyntaxNode offset=5, ""
      SyntaxNode offset=5, ""
    SyntaxNode offset=5, "example.com":
      SyntaxNode+DotAtomText0 offset=5, "example." (domain_text):
        SyntaxNode offset=5, "example":
          SyntaxNode offset=5, "e"
          SyntaxNode offset=6, "x"
          SyntaxNode offset=7, "a"
          SyntaxNode offset=8, "m"
          SyntaxNode offset=9, "p"
          SyntaxNode offset=10, "l"
          SyntaxNode offset=11, "e"
        SyntaxNode offset=12, "."
      SyntaxNode+DotAtomText0 offset=13, "com" (domain_text):
        SyntaxNode offset=13, "com":
          SyntaxNode offset=13, "c"
          SyntaxNode offset=14, "o"
          SyntaxNode offset=15, "m"
        SyntaxNode offset=16, ""
    SyntaxNode+CFWS1 offset=16, "":
      SyntaxNode offset=16, ""
      SyntaxNode offset=16, ""],
          @addresses=
           [#<Mail::Address:2173073680 Address: |from@example.com| >],
          @group_recipients=[],
          @individual_recipients=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "from@example.com" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "from" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "from":
      SyntaxNode+LocalDotAtomText0 offset=0, "from" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "from":
          SyntaxNode offset=0, "f"
          SyntaxNode offset=1, "r"
          SyntaxNode offset=2, "o"
          SyntaxNode offset=3, "m"
    SyntaxNode+CFWS1 offset=4, "":
      SyntaxNode offset=4, ""
      SyntaxNode offset=4, ""
  SyntaxNode offset=4, "@"
  SyntaxNode+DotAtom0 offset=5, "example.com" (dot_atom_text):
    SyntaxNode+CFWS1 offset=5, "":
      SyntaxNode offset=5, ""
      SyntaxNode offset=5, ""
    SyntaxNode offset=5, "example.com":
      SyntaxNode+DotAtomText0 offset=5, "example." (domain_text):
        SyntaxNode offset=5, "example":
          SyntaxNode offset=5, "e"
          SyntaxNode offset=6, "x"
          SyntaxNode offset=7, "a"
          SyntaxNode offset=8, "m"
          SyntaxNode offset=9, "p"
          SyntaxNode offset=10, "l"
          SyntaxNode offset=11, "e"
        SyntaxNode offset=12, "."
      SyntaxNode+DotAtomText0 offset=13, "com" (domain_text):
        SyntaxNode offset=13, "com":
          SyntaxNode offset=13, "c"
          SyntaxNode offset=14, "o"
          SyntaxNode offset=15, "m"
        SyntaxNode offset=16, ""
    SyntaxNode+CFWS1 offset=16, "":
      SyntaxNode offset=16, ""
      SyntaxNode offset=16, ""]>,
        @value="from@example.com">>,
     #<Mail::Field:0x103186628
      @field=
       #<Mail::ToField:0x103185c50
        @element=nil,
        @groups={},
        @length=nil,
        @name="To",
        @tree=
         #<Mail::AddressList:0x103185a70
          @address_nodes=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "to@example.org" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "to" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "to":
      SyntaxNode+LocalDotAtomText0 offset=0, "to" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "to":
          SyntaxNode offset=0, "t"
          SyntaxNode offset=1, "o"
    SyntaxNode+CFWS1 offset=2, "":
      SyntaxNode offset=2, ""
      SyntaxNode offset=2, ""
  SyntaxNode offset=2, "@"
  SyntaxNode+DotAtom0 offset=3, "example.org" (dot_atom_text):
    SyntaxNode+CFWS1 offset=3, "":
      SyntaxNode offset=3, ""
      SyntaxNode offset=3, ""
    SyntaxNode offset=3, "example.org":
      SyntaxNode+DotAtomText0 offset=3, "example." (domain_text):
        SyntaxNode offset=3, "example":
          SyntaxNode offset=3, "e"
          SyntaxNode offset=4, "x"
          SyntaxNode offset=5, "a"
          SyntaxNode offset=6, "m"
          SyntaxNode offset=7, "p"
          SyntaxNode offset=8, "l"
          SyntaxNode offset=9, "e"
        SyntaxNode offset=10, "."
      SyntaxNode+DotAtomText0 offset=11, "org" (domain_text):
        SyntaxNode offset=11, "org":
          SyntaxNode offset=11, "o"
          SyntaxNode offset=12, "r"
          SyntaxNode offset=13, "g"
        SyntaxNode offset=14, ""
    SyntaxNode+CFWS1 offset=14, "":
      SyntaxNode offset=14, ""
      SyntaxNode offset=14, ""],
          @addresses=[#<Mail::Address:2173072080 Address: |to@example.org| >],
          @group_recipients=[],
          @individual_recipients=
           [SyntaxNode+Address1+AddrSpec0 offset=0, "to@example.org" (domain,local_part,dig_comments,comments):
  SyntaxNode+LocalDotAtom0 offset=0, "to" (local_dot_atom_text):
    SyntaxNode+CFWS1 offset=0, "":
      SyntaxNode offset=0, ""
      SyntaxNode offset=0, ""
    SyntaxNode offset=0, "to":
      SyntaxNode+LocalDotAtomText0 offset=0, "to" (domain_text):
        SyntaxNode offset=0, ""
        SyntaxNode offset=0, "to":
          SyntaxNode offset=0, "t"
          SyntaxNode offset=1, "o"
    SyntaxNode+CFWS1 offset=2, "":
      SyntaxNode offset=2, ""
      SyntaxNode offset=2, ""
  SyntaxNode offset=2, "@"
  SyntaxNode+DotAtom0 offset=3, "example.org" (dot_atom_text):
    SyntaxNode+CFWS1 offset=3, "":
      SyntaxNode offset=3, ""
      SyntaxNode offset=3, ""
    SyntaxNode offset=3, "example.org":
      SyntaxNode+DotAtomText0 offset=3, "example." (domain_text):
        SyntaxNode offset=3, "example":
          SyntaxNode offset=3, "e"
          SyntaxNode offset=4, "x"
          SyntaxNode offset=5, "a"
          SyntaxNode offset=6, "m"
          SyntaxNode offset=7, "p"
          SyntaxNode offset=8, "l"
          SyntaxNode offset=9, "e"
        SyntaxNode offset=10, "."
      SyntaxNode+DotAtomText0 offset=11, "org" (domain_text):
        SyntaxNode offset=11, "org":
          SyntaxNode offset=11, "o"
          SyntaxNode offset=12, "r"
          SyntaxNode offset=13, "g"
        SyntaxNode offset=14, ""
    SyntaxNode+CFWS1 offset=14, "":
      SyntaxNode offset=14, ""
      SyntaxNode offset=14, ""]>,
        @value="to@example.org">>,
     #<Mail::Field:0x10310e290
      @field=
       #<Mail::UnstructuredField:0x1030be060
        @element=nil,
        @length=nil,
        @name="message-id",
        @tree=nil,
        @value="<>">>,
     #<Mail::Field:0x1031868d0
      @field=
       #<Mail::SubjectField:0x1031863d0
        @element=nil,
        @length=15,
        @name="Subject",
        @tree=nil,
        @value="Signup">>,
     #<Mail::Field:0x103125008
      @field=
       #<Mail::MimeVersionField:0x103124838
        @element=
         #<Mail::MimeVersionElement:0x1031244a0 @major="1", @minor="0">,
        @length=nil,
        @name="Mime-Version",
        @tree=nil,
        @value="1.0">>,
     #<Mail::Field:0x103134fa8
      @field=
       #<Mail::ContentTypeField:0x10312d8e8
        @element=
         #<Mail::ContentTypeElement:0x10312d0f0
          @main_type="text",
          @parameters=[],
          @sub_type="plain">,
        @length=nil,
        @main_type="text",
        @name="Content-Type",
        @parameters={"charset"=>"utf-8"},
        @sub_type="plain",
        @tree=nil,
        @value="text/plain">>,
     #<Mail::Field:0x1030dbbb0
      @field=
       #<Mail::ContentTransferEncodingField:0x1030da7b0
        @element=nil,
        @length=nil,
        @name="Content-Transfer-Encoding",
        @tree=nil,
        @value="7bit">>],
   @raw_source="">,
 @html_part=nil,
 @perform_deliveries=true,
 @raise_delivery_errors=true,
 @raw_source="",
 @text_part=nil>>.

1 tests, 1 assertions, 1 failures, 0 errors
Errors running test:functionals!

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages