• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
renatoathaydes / com.athaydes.specks / 0.7.1
Backends JVM JavaScript
Maven coordinates
Compatible Ceylon release JVM: 1.2.x, 1.3.x (latest)
JavaScript: Unknown (10/0)
Published Oct 2, 2017
Stats Downloads (JVM): 228
Downloads (JS): 53
Source downloads: 289
Description

specks

specks enables a different way to check that your Ceylon code works.

Instead of writing traditional tests, you write specifications.

The main difference is the focus: specifications focus on behaviour and outcomes, while unit tests focus on interactions and, most of the time, implementation details.

For example, here's a very simple Specification written with specks:

testExecutor (`class SpecksTestExecutor`)
test
shared Specification simpleSpec() => Specification {
    expectations {
        expect(max { 1, 2, 3 }, equalTo(3))
    }
};

> The testExecutor annotation can be added to a function, but also to a class or package… so you can avoid having to add it to every function.

For more information, visit Specks' GitHub page.

Dependencies
ceylon.language/1.3.3
ceylon.logging/1.3.3
ceylon.random/1.3.3 shared
ceylon.test/1.3.3.1 shared
Usage
  • Import
  • Run from command-line
  • Run from Ant
 import com.athaydes.specks "0.7.1";
$ ceylon run com.athaydes.specks/0.7.1
<property name="ceylon.home" value="…"/>
<property name="ceylon.ant.lib" 
  value="${ceylon.home}/lib/ceylon-ant.jar"/>
<path id="ant-tasks">
  <pathelement path="${ceylon.ant.lib}"/>
</path>
<typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/>

<target name="run">
  <ceylon-run module="com.athaydes.specks/0.7.1"/>
</target>
Module links Members
Imported By
Browse
Download .car
Download .js
Download source archive
Download module documentation
View API documentation

Ceylon Herd v1.24 Copyright 2012-2022 Red Hat. About