armin-joellenbeck-rdbc 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/README.rdoc +9 -18
  2. metadata +1 -1
@@ -1,4 +1,4 @@
1
- =Design by Contract for Ruby
1
+ =Rdbc -- Design by Contract for Ruby
2
2
 
3
3
  This library supports Design by Contract for Ruby.
4
4
 
@@ -10,20 +10,15 @@ Install the *rdbc* gem itself by the following command:
10
10
 
11
11
  =Usage
12
12
 
13
- A a standard example for Design by Contract consider the following Stack
14
- class and its contract StackContract.
15
-
16
- :include:spec/stack_spec.rb
17
-
18
- The mechanics are really simple. There is the class Stack.
13
+ Given there is a the class Foo.
19
14
  For instances of this class you can define a contract by subclassing
20
- <b>DesignByContract::Contract</b>, in the example the contract is named
21
- StackContract.
22
- Then connect the class Stack to its contract StackContract by using the line
23
- contract StackContract
24
- in the class definition of Stack.
15
+ <b>Rdbc::Contract</b>, in the example the contract is named
16
+ FooContract.
17
+ Then connect the class Foo to its contract FooContract by using the line
18
+ contract FooContract
19
+ in the class definition of Foo.
25
20
 
26
- Then the following happens when a method of a Stack instance is called:
21
+ Then the following happens when a method of a Foo instance is called:
27
22
 
28
23
  1. the corresponding pre condition is called with the parameters:
29
24
  * the instance itself
@@ -44,11 +39,7 @@ Then the following happens when a method of a Stack instance is called:
44
39
  The instance before the execution of *method* in 3. and 4.
45
40
  is in fact a copy of the instance before the execution. So you have to implement
46
41
  the method *initialize_copy* in the class under contract, i.e. the class
47
- Stack.
48
-
49
- In any of these contract methods you can use assertions as in Test::Unit tests.
50
- When an assertion fails, the exception Test::Unit::AssertionFailedError
51
- is raised.
42
+ Foo.
52
43
 
53
44
  =Support
54
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: armin-joellenbeck-rdbc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Armin Joellenbeck