Permalink
Browse files

Only include MailerExampleGroup if defined.

- Closes #307.
  • Loading branch information...
1 parent 26bd612 commit e01608aed7760c1466efc379954f6550e8406054 @CodeMonkeySteve CodeMonkeySteve committed with dchelimsky Jan 16, 2011
Showing with 6 additions and 3 deletions.
  1. +1 −0 History.md
  2. +5 −3 lib/rspec/rails/example.rb
View
@@ -7,6 +7,7 @@
* Bug fixes
* fixed bug in which `render_views` in a nested group set the value in its
parent group.
+ * only include MailerExampleGroup when it is defiend (Steve Sloan)
### 2.4.1 / 2011-01-03
@@ -18,9 +18,11 @@ def c.escaped_path(*parts)
c.include RSpec::Rails::HelperExampleGroup, :type => :helper, :example_group => {
:file_path => c.escaped_path(%w[spec helpers])
}
- c.include RSpec::Rails::MailerExampleGroup, :type => :mailer, :example_group => {
- :file_path => c.escaped_path(%w[spec mailers])
- }
+ if defined?(RSpec::Rails::MailerExampleGroup)
+ c.include RSpec::Rails::MailerExampleGroup, :type => :mailer, :example_group => {
+ :file_path => c.escaped_path(%w[spec mailers])
+ }
+ end
c.include RSpec::Rails::ModelExampleGroup, :type => :model, :example_group => {
:file_path => c.escaped_path(%w[spec models])
}

0 comments on commit e01608a

Please sign in to comment.