org.specs.Sugar

trait Sugar

trait Sugar

 extends Products with ConsoleOutput


Synctactic sugar for specifications. Since it makes heavy uses of implicit definitions,
The name reminds that it must be used with caution


Companion: Sugar

Source: Sugar.scala(13)

Direct Known Subclasses

Sugar,

Nested Classes

Printable, PrintableIterable, RangeInt,

 Fields

ko val ko
alias for the value false [details]
Allows to write myObject.status mustBe ko
Boolean
ok val ok
alias for the value true [details]
Allows to write myObject.status mustBe ok
Boolean

 Methods

!= final def !=(arg0 : Any) Boolean Any
!= final def !=(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Any) Boolean Any
anyPrintable implicit def anyPrintable[T](a : T)
This implicit definition allows to print any object to the console with:
myObject [details]
pln or myObject.println
Printable[T]
anyToList implicit def anyToList[T](a : T) List[T] Products
asInstanceOf final def asInstanceOf[T0] T0 Any
clone protected def clone Object AnyRef
eq final def eq(arg0 : Object) Boolean AnyRef
equals def equals(arg0 : Any) Boolean AnyRef
finalize protected def finalize Unit AnyRef
flush override def flush
flushes the content if necessary
Unit ConsoleOutput
getClass final def getClass Class[Object] AnyRef
hashCode def hashCode Int AnyRef
integerToRange implicit def integerToRange(n : Int)
This implicit definition allows to write short loops, ruby-style:
3 [details]
times { i => doThis() } . Warning: an integer variable i must be declared otherwise there will be a runtime exception
RangeInt
isInstanceOf final def isInstanceOf[T0] Boolean Any
iterableToPrintable implicit def iterableToPrintable[T](a : Iterable[T])
This implicit definition allows to print any iterable to the console with:
myIterable [details]
printEach. It also returns the iterable for better method insertion
PrintableIterable[T]
ne final def ne(arg0 : Object) Boolean AnyRef
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
printStackTrace def printStackTrace(t : Throwable)
prints stacktraces
Unit Output
printf def printf(format : String, args : Any*)
prints several objects according to a format string (see Console [details]
printf)
Unit ConsoleOutput
println def println(m : Any)
prints an object with a newline
Unit ConsoleOutput
productToList1 implicit def productToList1[T](t : Product1[T]) List[T] Products
productToList10 implicit def productToList10[T](t : Product10[T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList11 implicit def productToList11[T](t : Product11[T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList12 implicit def productToList12[T](t : Product12[T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList13 implicit def productToList13[T](t : Product13[T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList14 implicit def productToList14[T](t : Product14[T, T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList15 implicit def productToList15[T](t : Product15[T, T, T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList16 implicit def productToList16[T](t : Product16[T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList17 implicit def productToList17[T](t : Product17[T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList18 implicit def productToList18[T](t : Product18[T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList19 implicit def productToList19[T](t : Product19[T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T]) List[T] Products
productToList2 implicit def productToList2[T](t : Product2[T, T]) List[T] Products
productToList3 implicit def productToList3[T](t : Product3[T, T, T]) List[T] Products
productToList4 implicit def productToList4[T](t : Product4[T, T, T, T]) List[T] Products
productToList5 implicit def productToList5[T](t : Product5[T, T, T, T, T]) List[T] Products
productToList6 implicit def productToList6[T](t : Product6[T, T, T, T, T, T]) List[T] Products
productToList7 implicit def productToList7[T](t : Product7[T, T, T, T, T, T, T]) List[T] Products
productToList8 implicit def productToList8[T](t : Product8[T, T, T, T, T, T, T, T]) List[T] Products
productToList9 implicit def productToList9[T](t : Product9[T, T, T, T, T, T, T, T, T]) List[T] Products
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
toString def toString String AnyRef
unitToList implicit def unitToList(a : Unit) List[Nothing] Products
wait final def wait(arg0 : Long) Unit AnyRef
wait final def wait Unit AnyRef
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
Copyright (c) 2007-2009. All Rights Reserved.