Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only include MailerExampleGroup if defined.

- Closes #307.
  • Loading branch information...
commit e01608aed7760c1466efc379954f6550e8406054 1 parent 26bd612
@CodeMonkeySteve CodeMonkeySteve authored dchelimsky committed
Showing with 6 additions and 3 deletions.
  1. +1 −0  History.md
  2. +5 −3 lib/rspec/rails/example.rb
View
1  History.md
@@ -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
View
8 lib/rspec/rails/example.rb
@@ -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])
}
Please sign in to comment.
Something went wrong with that request. Please try again.