diff options
author | Mike Moore <mike@blowmage.com> | 2012-09-24 14:46:58 -0600 |
---|---|---|
committer | Mike Moore <mike@blowmage.com> | 2012-09-24 14:46:58 -0600 |
commit | 58434e05fe828a89ac11dd4aa051bd1d5d1cfb09 (patch) | |
tree | 460803a9a9652fea532ee8eb45487d69aed53cc2 /actionmailer/test | |
parent | 0ce383db58b4718147433ca0e06d7e88efd6c184 (diff) | |
download | rails-58434e05fe828a89ac11dd4aa051bd1d5d1cfb09.tar.gz rails-58434e05fe828a89ac11dd4aa051bd1d5d1cfb09.tar.bz2 rails-58434e05fe828a89ac11dd4aa051bd1d5d1cfb09.zip |
Support mailer tests using spec DSL
Improve how mailer tests to resolve mailers from the test name.
Add tests for mailer tests using the minitest spec DSL.
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/test_test.rb | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/actionmailer/test/test_test.rb b/actionmailer/test/test_test.rb index 86fd37bea6..139eb53359 100644 --- a/actionmailer/test/test_test.rb +++ b/actionmailer/test/test_test.rb @@ -26,3 +26,147 @@ class CrazyStringNameMailerTest < ActionMailer::TestCase assert_equal TestTestMailer, self.class.mailer_class end end + +describe TestTestMailer do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe TestTestMailer, :action do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe TestTestMailer do + describe "nested" do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe TestTestMailer, :action do + describe "nested" do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "TestTestMailer" do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "TestTestMailerTest" do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "TestTestMailer" do + describe "nested" do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "TestTestMailerTest" do + describe "nested" do + it "gets the mailer from the test name" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "AnotherCrazySymbolNameMailerTest" do + tests :test_test_mailer + + it "gets the mailer after setting it with a symbol" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "AnotherCrazyStringNameMailerTest" do + tests 'test_test_mailer' + + it "gets the mailer after setting it with a string" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "Another Crazy Name Mailer Test" do + tests TestTestMailer + + it "gets the mailer after setting it manually" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "Another Crazy Symbol Name Mailer Test" do + tests :test_test_mailer + + it "gets the mailer after setting it with a symbol" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "Another Crazy String Name Mailer Test" do + tests 'test_test_mailer' + + it "gets the mailer after setting it with a string" do + assert_equal TestTestMailer, self.class.mailer_class + end +end + +describe "AnotherCrazySymbolNameMailerTest" do + tests :test_test_mailer + + describe "nested" do + it "gets the mailer after setting it with a symbol" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "AnotherCrazyStringNameMailerTest" do + tests 'test_test_mailer' + + describe "nested" do + it "gets the mailer after setting it with a string" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "Another Crazy Name Mailer Test" do + tests TestTestMailer + + describe "nested" do + it "gets the mailer after setting it manually" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "Another Crazy Symbol Name Mailer Test" do + tests :test_test_mailer + + describe "nested" do + it "gets the mailer after setting it with a symbol" do + assert_equal TestTestMailer, self.class.mailer_class + end + end +end + +describe "Another Crazy String Name Mailer Test" do + tests 'test_test_mailer' + + it "gets the mailer after setting it with a string" do + assert_equal TestTestMailer, self.class.mailer_class + end +end |