The clos-fixtures Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The clos-fixtures Reference Manual

This is the clos-fixtures Reference Manual, version 0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:34:51 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

clos-fixtures

Build Status

ASDF-loadable fixtures for CLOS classes.

Usage

Fixture Syntax

(package:class-name
  (:slot-name1 value
   :slot-name2 value)
  (:slot-name1 value
   :slot-name2 value))
(package:another-class
  ...)

Example

(app:user
  (:name "eudoxia"
   :groups (:admin :staff))
  (:name "joe"
   :groups (:admin)))
(app:company
  (:name "Initech"
   :city "Denver"))

register-fixture

This method has to be defined for every class you want to load.

An example using the user model from the last example:

(defmethod clos-fixtures:register-fixture ((user myapp:user))
  (cl-mongo:db.insert "users" (cl-mongo:kv (name user) (groups user))))

Loading from Lisp

(clos-fixtures:load-fixtures
  #P"/path/to/fixture-file")

Loading from ASDF

Simply put this in your components tree (Check clos-fixtures-test.asd for an example):

(:fixture "filename")

Optionally, you can use the :package argument so you don't have to specify the package in the fixture itself. An example from the tests:

(:fixture "molecules" :package :clos-fixtures-test)
(molecule
 (:name "Methane"
  :formula "CH4")
 (:name "Cubane"
  :formula "C8H8"))

License

Copyright (c) 2014-2015 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the MIT License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 clos-fixtures

Author

Fernando Borretti

Home Page

https://github.com/eudoxia0/clos-fixtures

License

MIT

Description

ASDF-loadable fixtures for CLOS classes

Long Description

# clos-fixtures

[![Build Status](https://travis-ci.org/eudoxia0/clos-fixtures.svg?branch=master)](https://travis-ci.org/eudoxia0/clos-fixtures)

ASDF-loadable fixtures for CLOS classes.

# Usage

## Fixture Syntax

“‘lisp
(package:class-name
(:slot-name1 value
:slot-name2 value)
(:slot-name1 value
:slot-name2 value))
(package:another-class
...)
“‘

## Example

“‘lisp
(app:user
(:name "eudoxia"
:groups (:admin :staff))
(:name "joe"
:groups (:admin)))
(app:company
(:name "Initech"
:city "Denver"))
“‘

## ‘register-fixture‘

This method has to be defined for every class you want to load.

An example using the ‘user‘ model from the last example:

“‘lisp
(defmethod clos-fixtures:register-fixture ((user myapp:user))
(cl-mongo:db.insert "users" (cl-mongo:kv (name user) (groups user))))
“‘

## Loading from Lisp

“‘lisp
(clos-fixtures:load-fixtures
#P"/path/to/fixture-file")
“‘

## Loading from ASDF

Simply put this in your components tree (Check ‘clos-fixtures-test.asd‘ for an example):

“‘lisp
(:fixture "filename")
“‘

Optionally, you can use the ‘:package‘ argument so you don’t have to specify the
package in the fixture itself. An example from the tests:

“‘lisp
(:fixture "molecules" :package :clos-fixtures-test)
“‘

“‘lisp
(molecule
(:name "Methane"
:formula "CH4")
(:name "Cubane"
:formula "C8H8"))
“‘

# License

Copyright (c) 2014-2015 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the MIT License.

Version

0.1

Source

clos-fixtures.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 clos-fixtures/src

Parent

clos-fixtures (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 clos-fixtures.asd

Location

clos-fixtures.asd

Systems

clos-fixtures (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 clos-fixtures/src/clos-fixtures.lisp

Parent

src (module)

Location

src/clos-fixtures.lisp

Packages

clos-fixtures

Exported Definitions
Internal Definitions

read-fixtures (function)


Previous: , Up: Lisp files   [Contents][Index]

4.1.3 clos-fixtures/src/asdf.lisp

Parent

src (module)

Location

src/asdf.lisp

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 clos-fixtures

Source

clos-fixtures.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Functions

Function: load-fixtures PATHNAME &optional PACKAGE-NAME
Package

clos-fixtures

Source

clos-fixtures.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Generic functions

Generic Function: register-fixture INSTANCE

Register a fixture.

Package

clos-fixtures

Source

clos-fixtures.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Functions

Function: read-fixtures PATH PACKAGE
Package

clos-fixtures

Source

clos-fixtures.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Generic functions

Generic Function: fixture-package-name OBJECT
Package

clos-fixtures

Methods
Method: fixture-package-name (FIXTURE fixture)

The name of the package to read the forms in.

Source

asdf.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Classes

Class: fixture ()
Package

clos-fixtures

Source

asdf.lisp (file)

Direct superclasses

source-file (class)

Direct methods
Direct slots
Slot: type
Initform

"lisp"

Slot: package-name

The name of the package to read the forms in.

Initargs

:package

Initform

:cl

Readers

fixture-package-name (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
clos-fixtures.asd: The clos-fixtures<dot>asd file
clos-fixtures/src: The clos-fixtures/src module
clos-fixtures/src/asdf.lisp: The clos-fixtures/src/asdf<dot>lisp file
clos-fixtures/src/clos-fixtures.lisp: The clos-fixtures/src/clos-fixtures<dot>lisp file

F
File, Lisp, clos-fixtures.asd: The clos-fixtures<dot>asd file
File, Lisp, clos-fixtures/src/asdf.lisp: The clos-fixtures/src/asdf<dot>lisp file
File, Lisp, clos-fixtures/src/clos-fixtures.lisp: The clos-fixtures/src/clos-fixtures<dot>lisp file

L
Lisp File, clos-fixtures.asd: The clos-fixtures<dot>asd file
Lisp File, clos-fixtures/src/asdf.lisp: The clos-fixtures/src/asdf<dot>lisp file
Lisp File, clos-fixtures/src/clos-fixtures.lisp: The clos-fixtures/src/clos-fixtures<dot>lisp file

M
Module, clos-fixtures/src: The clos-fixtures/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   G   L   M   R  
Index Entry  Section

F
fixture-package-name: Internal generic functions
fixture-package-name: Internal generic functions
Function, load-fixtures: Exported functions
Function, read-fixtures: Internal functions

G
Generic Function, fixture-package-name: Internal generic functions
Generic Function, register-fixture: Exported generic functions

L
load-fixtures: Exported functions

M
Method, fixture-package-name: Internal generic functions

R
read-fixtures: Internal functions
register-fixture: Exported generic functions

Jump to:   F   G   L   M   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   P   S   T  
Index Entry  Section

P
package-name: Internal classes

S
Slot, package-name: Internal classes
Slot, type: Internal classes

T
type: Internal classes

Jump to:   P   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   F   P   S  
Index Entry  Section

C
Class, fixture: Internal classes
clos-fixtures: The clos-fixtures system
clos-fixtures: The clos-fixtures package

F
fixture: Internal classes

P
Package, clos-fixtures: The clos-fixtures package

S
System, clos-fixtures: The clos-fixtures system

Jump to:   C   F   P   S