Thursday, June 04, 2026 1:47:57 AM
> test_present_active_support.rb
# frozen_string_literal: true

require "test_helper"

class TestOstructPresent < Minitest::Test
  def setup
    fail "Active support must be defined for this test" unless defined?(ActiveSupport)
  end

  def test_it_is_present
    input = OpenStruct.new(foo: "bar")

    assert(input.present?)
  end

  def test_it_is_not_present
    input = OpenStruct.new

    refute(input.present?)
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2