Skip to content

Don't define global method "assert" #5

@TSMMark

Description

@TSMMark

def assert
raise "Assertion failed !" unless yield
end

conflicts with testing libraries like minitest, cutest, etc.

Should be just as easy to def assert on a pdfcrowd module instead.

Example of what can go wrong

ArgumentError: wrong number of arguments (given 2, expected 0)
    /usr/local/bundle/ruby/3.0.0/gems/pdfcrowd-4.4.2/lib/pdfcrowd.rb:403:in `assert'
    /usr/local/bundle/ruby/3.0.0/gems/cutest-1.2.3/lib/cutest.rb:159:in `assert_equal'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions