Skip to content
/ da_spec Public

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

License

Notifications You must be signed in to change notification settings

da99/da_spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published