Skip to content

Commit ea40c54

Browse files
committed
Merge pull request rspec#1573 from rspec/rails-further-updates
Bring RSpec current with rails 5 beta 3
2 parents 358054c + 0c69f45 commit ea40c54

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ matrix:
5858
- rvm: 2.2.2
5959
env: RAILS_VERSION=master
6060
- rvm: 2.2.2
61-
env: RAILS_VERSION=5.0.0.beta2
61+
env: RAILS_VERSION=5.0.0.beta3
6262
- rvm: 2.3.0
6363
env: RAILS_VERSION=master
6464
- rvm: 2.3.0
65-
env: RAILS_VERSION=5.0.0.beta2
65+
env: RAILS_VERSION=5.0.0.beta3
6666
exclude:
6767
# 3.0.x is not supported on MRI 2.0+
6868
- rvm: 2.0.0

example_app_generator/generate_action_mailer_specs.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def comment_lines(path, flag, *args)
1313
comment_lines 'config/environments/test.rb', /action_mailer/
1414

1515
initializer 'action_mailer.rb', <<-CODE
16+
require "action_view/base"
1617
if ENV['DEFAULT_URL']
1718
if ::Rails::VERSION::STRING < '4.1'
1819
ExampleApp::Application.configure do

example_app_generator/generate_app.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
function_script_file = File.join(rspec_rails_repo_path, 'script/functions.sh')
1414

1515
in_root do
16+
prepend_to_file "Rakefile", "require 'active_support/all'"
17+
1618
# Remove the existing rails version so we can properly use master or other
1719
# edge branches
1820
gsub_file 'Gemfile', /^.*\bgem 'rails.*$/, ''

lib/generators/rspec/mailer/templates/preview.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class <%= class_name %>Preview < ActionMailer::Preview
55

66
# Preview this email at http://localhost:3000/rails/mailers/<%= file_path %>/<%= action %>
77
def <%= action %>
8-
<%= class_name %>.<%= action %>
8+
<%= class_name %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>.<%= action %>
99
end
1010
<% end -%>
1111

0 commit comments

Comments
 (0)