Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Minor fix for Example #307

Closed
wants to merge 1 commit into from

1 participant

@CodeMonkeySteve

Only include MailerExampleGroup if defined (i.e. if ActionMailer is defined).

@CodeMonkeySteve

Only include MailerExampleGroup if defined.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 16, 2011
  1. @CodeMonkeySteve
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/rspec/rails/example.rb
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])
}
Something went wrong with that request. Please try again.