Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Jan 27, 2025
1 parent 08644d0 commit 43f05b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
20 changes: 8 additions & 12 deletions spec/hatchet/ruby_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def rails_lts_config
end

def rails_lts_stack
"heroku-20"
"heroku-22"
end

def hatchet_path(path = "")
Expand Down

0 comments on commit 43f05b6

Please sign in to comment.