This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestObj | |
def method_missing(method_name, *args) | |
if method_name == :works? | |
true | |
else | |
super | |
end | |
end | |
def respond_to_missing?(method_name, include_private = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SessionSystemTestHelper | |
def sign_in_as(user) | |
visit root_url # any fast-to-load page will do | |
cookie_jar = ActionDispatch::TestRequest.create.cookie_jar | |
cookie_jar.signed[:session_token] = user.sessions.create.token | |
page.driver.browser.manage.add_cookie(name: "session_token", value: cookie_jar[:session_token], sameSite: :Lax, httpOnly: true) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
gem "rails" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
gem "rails", github: "rails/rails", branch: "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rufus-scheduler' | |
scheduler = Rufus::Scheduler.new | |
job = scheduler.schedule_cron('0 7 * * 6 America/Denver') { } | |
job.next_times(10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
homebrew=/usr/local/bin:/usr/local/sbin | |
export PATH=$homebrew:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew doctor |