Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Chemistry is a Testing Framework for Elixir

NotificationsYou must be signed in to change notification settings

genericlady/chemistry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A testing framework for Elixir.

Installation

available in Hex, the package can be installed as:

  1. Addchemistry to your list of dependencies inmix.exs:
defdepsdo[{:chemistry,"~> 0.1.4"}]end
  1. Ensurechemistry is started before your application:
defapplicationdo[applications:[:chemistry]]end

Examples

From Interactive Elixir, typeiex from terminal.

iex(1)>importChemistry.LabChemistry.Labiex(2)>expect1==1.:okiex(3)>expect1>1FAILURE:Expected:1tobegreaterthan1:okiex(4)>

Place all labs inside of./lab and be sure to append_lab.exs toanything you want to be a lab.

Write expressive tests using a call toit followed by a descriptionfor the lab.

defmoduleMathLabdouseChemistry.Labit"Can use integers for addition and subtraction."doexpect2+3==5expect5-5==10endit"Can use integers for multiplication and division"doexpect5*5==25expect10/2==5endend

Runiex from the terminal to see an example file message.

iex(1)> MathLab.run.===========================================FAILURE: Can use integers for addition and subtraction.===========================================FAILURE:  Expected: 0 to be equal to 10:ok

License

Copyright 2016 Yianna Kokalas

Licensed under the Apache License, Version 2.0 (the "License"); you maynot use this file except in compliance with the License. You may obtaina copy of the License atApache2.0

Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

About

Chemistry is a Testing Framework for Elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp