<s>
Bogus	B-Language
is	O
a	O
Ruby	B-Language
API	B-Application
library	O
used	O
for	O
minimizing	O
risks	O
involved	O
in	O
isolated	O
unit	O
testing	O
.	O
</s>
<s>
Through	O
Bogus	B-Language
,	O
a	O
piece	O
of	O
code	O
can	O
be	O
tested	O
in	O
a	O
fast	O
and	O
safe	O
manner	O
,	O
without	O
any	O
actual	O
integration	O
with	O
external	O
programs	O
.	O
</s>
<s>
Bogus	B-Language
cannot	O
mock	O
or	O
stub	O
methods	O
not	O
present	O
in	O
the	O
required	O
external	O
environment	O
.	O
</s>
<s>
Ruby	B-Language
provides	O
various	O
features	O
to	O
achieve	O
the	O
required	O
testing	O
framework	O
.	O
</s>
<s>
Bogus	B-Language
deals	O
with	O
this	O
problem	O
by	O
introducing	O
DSL	O
to	O
configure	O
fakes	O
in	O
a	O
single	O
place	O
,	O
thus	O
unifying	O
its	O
use	O
in	O
all	O
the	O
tests	O
.	O
</s>
<s>
Bogus	B-Language
solves	O
this	O
problem	O
by	O
creating	O
a	O
duck	B-Application
type	I-Application
for	O
classes	O
.	O
</s>
<s>
Syntax	O
to	O
create	O
a	O
duck	B-Application
type	I-Application
:	O
</s>
<s>
Bogus	B-Language
simplifies	O
it	O
further	O
by	O
creating	O
duck	B-Application
types	I-Application
automatically	O
when	O
more	O
than	O
one	O
class	O
are	O
returned	O
from	O
fake	O
.	O
</s>
<s>
In	O
order	O
to	O
verify	O
that	O
exception	B-General_Concept
handling	I-General_Concept
is	O
done	O
as	O
expected	O
in	O
the	O
fake	O
stub	O
,	O
a	O
sample	O
test	O
should	O
be	O
written	O
for	O
the	O
mock	O
object	O
.	O
</s>
<s>
This	O
test	O
is	O
not	O
written	O
by	O
Bogus	B-Language
,	O
but	O
it	O
reminds	O
the	O
developer	O
to	O
do	O
so	O
.	O
</s>
<s>
Bogus	B-Language
automatically	O
verifies	O
whether	O
the	O
contract	O
is	O
satisfied	O
or	O
not	O
.	O
</s>
<s>
In	O
addition	O
to	O
fakes	O
,	O
bogus	B-Language
allows	O
stubs	O
in	O
the	O
cases	O
where	O
the	O
inversion	B-Language
of	I-Language
control	I-Language
principle	O
is	O
not	O
used	O
.	O
</s>
<s>
The	O
syntax	O
is	O
similar	O
to	O
that	O
of	O
ruby	B-Language
stubbing	O
:	O
The	O
main	O
difference	O
between	O
fakes	O
and	O
stubbing	O
is	O
that	O
in	O
fakes	O
,	O
method	O
call	O
can	O
be	O
verified	O
before	O
stubbing	O
.	O
</s>
<s>
Instead	O
of	O
the	O
actual	O
arguments	O
,	O
some	O
matchers	O
like	O
wildcard	B-Algorithm
entries	I-Algorithm
or	O
regular	B-Language
expressions	I-Language
can	O
be	O
used	O
.	O
</s>
<s>
Bogus	B-Language
configuration	O
syntax	O
:	O
</s>
<s>
By	O
default	O
,	O
Bogus	B-Language
does	O
not	O
maintain	O
a	O
namespace	O
.	O
</s>
<s>
Bogus	B-Language
isolates	O
objects	O
while	O
unit	O
testing	O
i.e.	O
,	O
it	O
does	O
not	O
require	O
any	O
information	O
of	O
classes	O
or	O
objects	O
involved	O
in	O
testing	O
object	O
method	O
,	O
whereas	O
Rspec	B-Application
Mocks	O
require	O
additional	O
information	O
regarding	O
objects	O
used	O
in	O
testing	O
object	O
.	O
</s>
<s>
One	O
major	O
advantage	O
of	O
using	O
bogus	B-Language
over	O
Rspec	B-Application
Mocks	O
is	O
that	O
Bogus	B-Language
provides	O
safe	O
stubbing	O
.	O
</s>
