From 43f05b693b903f28a1c94e514365026ed787e894 Mon Sep 17 00:00:00 2001 From: Schneems Date: Mon, 27 Jan 2025 17:14:48 -0600 Subject: [PATCH] Update tests --- spec/hatchet/ruby_spec.rb | 20 ++++++++------------ spec/spec_helper.rb | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/spec/hatchet/ruby_spec.rb b/spec/hatchet/ruby_spec.rb index e221c4205..66763ca3d 100644 --- a/spec/hatchet/ruby_spec.rb +++ b/spec/hatchet/ruby_spec.rb @@ -256,16 +256,6 @@ end end - describe "Rake detection" do - context "Ruby 1.9+" do - it "runs a rake task if the gem exists" do - Hatchet::Runner.new('default_with_rakefile').deploy do |app, heroku| - expect(app.output).to include("foo") - end - end - end - end - describe "database configuration" do context "no active record" do it "writes a heroku specific database.yml" do @@ -279,8 +269,14 @@ context "active record 4.1+" do it "doesn't write a heroku specific database.yml" do - Hatchet::Runner.new("activerecord41_scaffold").deploy do |app, heroku| - expect(app.output).not_to include("Writing config/database.yml to read from DATABASE_URL") + Hatchet::Runner.new("activerecord41_scaffold", config: rails_lts_config, stack: rails_lts_stack).tap do |app| + app.before_deploy do + Pathname("Gemfile").write("ruby '2.7.2'", mode: "a") + end + + app.deploy do + expect(app.output).not_to include("Writing config/database.yml to read from DATABASE_URL") + end end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 115ca3b18..c88960213 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -65,7 +65,7 @@ def rails_lts_config end def rails_lts_stack - "heroku-20" + "heroku-22" end def hatchet_path(path = "")