da_spec

My personal spec (ie testing) library because I work alone and I can do stupid stuff like this.

da_spec.cr

My personal testing library for use in Crystal. No one would want to use this except myself.

Reference


  require "da_spec"

  DA_Spec.pattern "name of test"
  DA_Spec.pattern /name of test/

  extend DA_SPEC

  describe "My_Class" do

    it "does something" do
      assert My_Class.name == "My_Class"
    end

    it "fails" do
      assert_raises(IndexError) {
        a = [] of Int32
        a.pop
      } # returns the error.
    end

  end # === describe

  module DA_SPEC
    def examine(*pairs)
      # override this method to display the actual/expected
      # results when an assertion fails.
    end
  end # module
Repository

da_spec

Owner
Statistic
  • 0
  • 0
  • 0
  • 2
  • 0
  • almost 4 years ago
  • December 23, 2017
License

MIT License

Links
Synced at

Wed, 06 Nov 2024 22:46:43 GMT

Languages