Skip to content

Commit

Permalink
Fixes a bunch of tests against rails master
Browse files Browse the repository at this point in the history
now blocked on rails/rails#36030
  • Loading branch information
Sam Phippen committed Jun 12, 2019
1 parent c1a97c0 commit 66aa9c3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ platforms :jruby do
gem "jruby-openssl"
end

gem 'sqlite3', '~> 1.3.6'
if RAILS_VERSION >= "6"
gem 'sqlite3', '~> 1.4'
else
gem 'sqlite3', '~> 1.3.6'
end

if RUBY_VERSION >= '2.4.0'
gem 'json', '>= 2.0.2'
Expand Down
1 change: 0 additions & 1 deletion Gemfile-rails-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ when /master/
gem "activerecord-deprecated_finders", :git => "https://github.com/rails/activerecord-deprecated_finders.git"
gem "rails-observers", :git => "https://github.com/rails/rails-observers"
gem "web-console", :git => "https://github.com/rails/web-console", :group => :development
gem 'sass-rails', :git => "https://github.com/rails/sass-rails.git"
gem 'coffee-rails', :git => "https://github.com/rails/coffee-rails.git"
gem 'rack', :git => 'https://github.com/rack/rack.git'
gem 'i18n', :git => 'https://github.com/svenfuchs/i18n.git', :branch => 'master'
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace :generate do

# Rails 4 cannot use a `rails` binstub generated by Bundler
sh "rm -f #{bindir}/rails"
sh "bundle exec rails new ./tmp/example_app --no-rc --skip-javascript --skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"
sh "bundle exec rails new ./tmp/example_app --no-rc --skip-javascript --skip-bootsnap -skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --template=example_app_generator/generate_app.rb"

in_example_app do
sh "./travis_retry_bundle_install.sh 2>&1"
Expand Down
2 changes: 2 additions & 0 deletions example_app_generator/generate_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
gsub_file "Gemfile", /.*byebug.*/, "gem 'byebug', '~> 9.0.6'"
gsub_file "Gemfile", /.*puma.*/, ""
gsub_file "Gemfile", /.*sqlite3.*/, "gem 'sqlite3', '~> 1.3.6'"
gsub_file "Gemfile", /.*bootsnap.*/, ""
if RUBY_VERSION < '2.2.2'
gsub_file "Gemfile", /.*rdoc.*/, "gem 'rdoc', '< 6'"
end

if Rails::VERSION::STRING >= '6'
gsub_file "Gemfile", /.*jbuilder.*/, "gem 'jbuilder', :git => 'https://github.com/rails/jbuilder.git', :branch => 'master'"
gsub_file "Gemfile", /.*sqlite3.*/, "gem 'sqlite3', '~> 1.4'"
end

if Rails::VERSION::STRING >= '5.0.0'
Expand Down
1 change: 1 addition & 0 deletions example_app_generator/spec/verify_custom_renderers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def index
end

it "renders an empty string" do
skip if Rails::VERSION::STRING.to_f >= 6.0
get :index

expect(response.body).to eq("")
Expand Down

0 comments on commit 66aa9c3

Please sign in to comment.