mocha 0.11.3 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. data/README.rdoc +3 -3
  2. data/RELEASE.rdoc +3 -0
  3. data/Rakefile +1 -3
  4. data/lib/mocha/version.rb +1 -1
  5. data/mocha.gemspec +1 -1
  6. metadata +12 -67
  7. data/doc/.nojekyll +0 -0
  8. data/doc/Mocha.html +0 -112
  9. data/doc/Mocha/API.html +0 -898
  10. data/doc/Mocha/ClassMethods.html +0 -246
  11. data/doc/Mocha/Configuration.html +0 -471
  12. data/doc/Mocha/Expectation.html +0 -2570
  13. data/doc/Mocha/Mock.html +0 -830
  14. data/doc/Mocha/ObjectMethods.html +0 -668
  15. data/doc/Mocha/ParameterMatchers.html +0 -2715
  16. data/doc/Mocha/ParameterMatchers/AllOf.html +0 -137
  17. data/doc/Mocha/ParameterMatchers/AnyOf.html +0 -137
  18. data/doc/Mocha/ParameterMatchers/AnyParameters.html +0 -136
  19. data/doc/Mocha/ParameterMatchers/Anything.html +0 -136
  20. data/doc/Mocha/ParameterMatchers/Base.html +0 -419
  21. data/doc/Mocha/ParameterMatchers/Equals.html +0 -137
  22. data/doc/Mocha/ParameterMatchers/HasEntries.html +0 -137
  23. data/doc/Mocha/ParameterMatchers/HasEntry.html +0 -137
  24. data/doc/Mocha/ParameterMatchers/HasKey.html +0 -137
  25. data/doc/Mocha/ParameterMatchers/HasValue.html +0 -137
  26. data/doc/Mocha/ParameterMatchers/Includes.html +0 -137
  27. data/doc/Mocha/ParameterMatchers/InstanceOf.html +0 -137
  28. data/doc/Mocha/ParameterMatchers/IsA.html +0 -136
  29. data/doc/Mocha/ParameterMatchers/KindOf.html +0 -137
  30. data/doc/Mocha/ParameterMatchers/Not.html +0 -137
  31. data/doc/Mocha/ParameterMatchers/Optionally.html +0 -136
  32. data/doc/Mocha/ParameterMatchers/QueryStringMatches.html +0 -136
  33. data/doc/Mocha/ParameterMatchers/RegexpMatches.html +0 -137
  34. data/doc/Mocha/ParameterMatchers/RespondsWith.html +0 -137
  35. data/doc/Mocha/ParameterMatchers/YamlEquivalent.html +0 -137
  36. data/doc/Mocha/Sequence.html +0 -133
  37. data/doc/Mocha/StateMachine.html +0 -510
  38. data/doc/Mocha/StateMachine/State.html +0 -125
  39. data/doc/Mocha/StateMachine/StatePredicate.html +0 -125
  40. data/doc/Mocha/StubbingError.html +0 -134
  41. data/doc/Mocha/UnexpectedInvocation.html +0 -124
  42. data/doc/_index.html +0 -481
  43. data/doc/class_list.html +0 -47
  44. data/doc/css/common.css +0 -1
  45. data/doc/css/full_list.css +0 -55
  46. data/doc/css/style.css +0 -322
  47. data/doc/file.COPYING.html +0 -72
  48. data/doc/file.MIT-LICENSE.html +0 -86
  49. data/doc/file.README.html +0 -153
  50. data/doc/file.RELEASE.html +0 -954
  51. data/doc/file.misc.html +0 -108
  52. data/doc/file.mocha.html +0 -90
  53. data/doc/file.stubba.html +0 -129
  54. data/doc/file_list.html +0 -67
  55. data/doc/frames.html +0 -13
  56. data/doc/index.html +0 -153
  57. data/doc/js/app.js +0 -205
  58. data/doc/js/full_list.js +0 -173
  59. data/doc/js/jquery.js +0 -16
  60. data/doc/method_list.html +0 -510
  61. data/doc/top-level-namespace.html +0 -105
@@ -1,137 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Mocha::ParameterMatchers::RespondsWith
8
-
9
- &mdash; Mocha 0.11.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../../_index.html">Index (R)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../../Mocha.html" title="Mocha (module)">Mocha</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ParameterMatchers.html" title="Mocha::ParameterMatchers (module)">ParameterMatchers</a></span></span>
38
- &raquo;
39
- <span class="title">RespondsWith</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Mocha::ParameterMatchers::RespondsWith
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName"><span class='object_link'><a href="Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span></span>
70
-
71
- <ul class="fullTree">
72
- <li><span class='object_link'><a href="../../Object.html" title="Object (class)">Object</a></span></li>
73
-
74
- <li class="next"><span class='object_link'><a href="Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span></li>
75
-
76
- <li class="next">Mocha::ParameterMatchers::RespondsWith</li>
77
-
78
- </ul>
79
- <a href="#" class="inheritanceTree">show all</a>
80
-
81
- </dd>
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
- <dt class="r2 last">Defined in:</dt>
92
- <dd class="r2 last">lib/mocha/parameter_matchers/responds_with.rb</dd>
93
-
94
- </dl>
95
- <div class="clear"></div>
96
-
97
- <h2>Overview</h2><div class="docstring">
98
- <div class="discussion">
99
-
100
- <p>Parameter matcher which matches if actual parameter returns expected result
101
- when specified method is invoked.</p>
102
-
103
-
104
- </div>
105
- </div>
106
- <div class="tags">
107
-
108
-
109
- </div>
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
- <h2>Method Summary</h2>
123
-
124
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span></h3>
125
- <p class="inherited"><span class='object_link'><a href="Base.html#%26-instance_method" title="Mocha::ParameterMatchers::Base#&amp; (method)">#&</a></span>, <span class='object_link'><a href="Base.html#%7C-instance_method" title="Mocha::ParameterMatchers::Base#| (method)">#|</a></span></p>
126
-
127
-
128
- </div>
129
-
130
- <div id="footer">
131
- Generated on Wed Apr 25 16:51:31 2012 by
132
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
133
- 0.7.5 (ruby-1.9.3).
134
- </div>
135
-
136
- </body>
137
- </html>
@@ -1,137 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Mocha::ParameterMatchers::YamlEquivalent
8
-
9
- &mdash; Mocha 0.11.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '../..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../../_index.html">Index (Y)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../../Mocha.html" title="Mocha (module)">Mocha</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ParameterMatchers.html" title="Mocha::ParameterMatchers (module)">ParameterMatchers</a></span></span>
38
- &raquo;
39
- <span class="title">YamlEquivalent</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Mocha::ParameterMatchers::YamlEquivalent
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName"><span class='object_link'><a href="Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span></span>
70
-
71
- <ul class="fullTree">
72
- <li><span class='object_link'><a href="../../Object.html" title="Object (class)">Object</a></span></li>
73
-
74
- <li class="next"><span class='object_link'><a href="Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span></li>
75
-
76
- <li class="next">Mocha::ParameterMatchers::YamlEquivalent</li>
77
-
78
- </ul>
79
- <a href="#" class="inheritanceTree">show all</a>
80
-
81
- </dd>
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
- <dt class="r2 last">Defined in:</dt>
92
- <dd class="r2 last">lib/mocha/parameter_matchers/yaml_equivalent.rb</dd>
93
-
94
- </dl>
95
- <div class="clear"></div>
96
-
97
- <h2>Overview</h2><div class="docstring">
98
- <div class="discussion">
99
-
100
- <p>Parameter matcher which matches if actual parameter is YAML equivalent of
101
- specified object.</p>
102
-
103
-
104
- </div>
105
- </div>
106
- <div class="tags">
107
-
108
-
109
- </div>
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
- <h2>Method Summary</h2>
123
-
124
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span></h3>
125
- <p class="inherited"><span class='object_link'><a href="Base.html#%26-instance_method" title="Mocha::ParameterMatchers::Base#&amp; (method)">#&</a></span>, <span class='object_link'><a href="Base.html#%7C-instance_method" title="Mocha::ParameterMatchers::Base#| (method)">#|</a></span></p>
126
-
127
-
128
- </div>
129
-
130
- <div id="footer">
131
- Generated on Wed Apr 25 16:51:31 2012 by
132
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
133
- 0.7.5 (ruby-1.9.3).
134
- </div>
135
-
136
- </body>
137
- </html>
@@ -1,133 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Mocha::Sequence
8
-
9
- &mdash; Mocha 0.11.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../_index.html">Index (S)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span>
38
- &raquo;
39
- <span class="title">Sequence</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Mocha::Sequence
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName"><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></span>
70
-
71
- <ul class="fullTree">
72
- <li><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></li>
73
-
74
- <li class="next">Mocha::Sequence</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- <dt class="r2 last">Defined in:</dt>
90
- <dd class="r2 last">lib/mocha/sequence.rb</dd>
91
-
92
- </dl>
93
- <div class="clear"></div>
94
-
95
- <h2>Overview</h2><div class="docstring">
96
- <div class="discussion">
97
-
98
- <p>Used to constrain the order in which expectations can occur.</p>
99
-
100
-
101
- </div>
102
- </div>
103
- <div class="tags">
104
-
105
-
106
- <h3>See Also:</h3>
107
- <ul class="see">
108
-
109
- <li><span class='object_link'><a href="API.html#sequence-instance_method" title="Mocha::API#sequence (method)">API#sequence</a></span></li>
110
-
111
- <li><span class='object_link'><a href="Expectation.html#in_sequence-instance_method" title="Mocha::Expectation#in_sequence (method)">Expectation#in_sequence</a></span></li>
112
-
113
- </ul>
114
-
115
- </div>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
- </div>
125
-
126
- <div id="footer">
127
- Generated on Wed Apr 25 16:51:30 2012 by
128
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
- 0.7.5 (ruby-1.9.3).
130
- </div>
131
-
132
- </body>
133
- </html>
@@ -1,510 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Mocha::StateMachine
8
-
9
- &mdash; Mocha 0.11.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../_index.html">Index (S)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span>
38
- &raquo;
39
- <span class="title">StateMachine</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Mocha::StateMachine
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName"><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></span>
70
-
71
- <ul class="fullTree">
72
- <li><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></li>
73
-
74
- <li class="next">Mocha::StateMachine</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- <dt class="r2 last">Defined in:</dt>
90
- <dd class="r2 last">lib/mocha/state_machine.rb</dd>
91
-
92
- </dl>
93
- <div class="clear"></div>
94
-
95
- <h2>Overview</h2><div class="docstring">
96
- <div class="discussion">
97
-
98
- <p>A state machine that is used to constrain the order of invocations. An
99
- invocation can be constrained to occur when a state <span class='object_link'><a href="#is-instance_method" title="Mocha::StateMachine#is (method)">#is</a></span>, or <span class='object_link'><a href="#is_not-instance_method" title="Mocha::StateMachine#is_not (method)">#is_not</a></span>,
100
- active.</p>
101
-
102
-
103
- </div>
104
- </div>
105
- <div class="tags">
106
-
107
-
108
- </div><h2>Defined Under Namespace</h2>
109
- <p class="children">
110
-
111
-
112
-
113
-
114
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="StateMachine/State.html" title="Mocha::StateMachine::State (class)">State</a></span>, <span class='object_link'><a href="StateMachine/StatePredicate.html" title="Mocha::StateMachine::StatePredicate (class)">StatePredicate</a></span>
115
-
116
-
117
- </p>
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
- <h2>
127
- Instance Method Summary
128
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
129
- </h2>
130
-
131
- <ul class="summary">
132
-
133
- <li class="public ">
134
- <span class="summary_signature">
135
-
136
- <a href="#become-instance_method" title="#become (instance method)">- (Object) <strong>become</strong>(next_state_name) </a>
137
-
138
-
139
-
140
- </span>
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
- <span class="summary_desc"><div class='inline'>
150
- <p>Put the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">StateMachine</a></span> into the <tt>next_state_name</tt>.</p>
151
- </div></span>
152
-
153
- </li>
154
-
155
-
156
- <li class="public ">
157
- <span class="summary_signature">
158
-
159
- <a href="#is-instance_method" title="#is (instance method)">- (State) <strong>is</strong>(state_name) </a>
160
-
161
-
162
-
163
- </span>
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
- <span class="summary_desc"><div class='inline'>
173
- <p>Provides a mechanism to change the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">StateMachine</a></span> into the state specified
174
- by <tt>state_name</tt> at some point in the future.</p>
175
- </div></span>
176
-
177
- </li>
178
-
179
-
180
- <li class="public ">
181
- <span class="summary_signature">
182
-
183
- <a href="#is_not-instance_method" title="#is_not (instance method)">- (Object) <strong>is_not</strong>(state_name) </a>
184
-
185
-
186
-
187
- </span>
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
- <span class="summary_desc"><div class='inline'>
197
- <p>Provides a mechanism to determine whether the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">StateMachine</a></span> is not in the
198
- state specified by <tt>state_name</tt> at some point in the future.</p>
199
- </div></span>
200
-
201
- </li>
202
-
203
-
204
- <li class="public ">
205
- <span class="summary_signature">
206
-
207
- <a href="#starts_as-instance_method" title="#starts_as (instance method)">- (StateMachine) <strong>starts_as</strong>(initial_state_name) </a>
208
-
209
-
210
-
211
- </span>
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
- <span class="summary_desc"><div class='inline'>
221
- <p>Put the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">StateMachine</a></span> into the state specified by
222
- <tt>initial_state_name</tt>.</p>
223
- </div></span>
224
-
225
- </li>
226
-
227
-
228
- </ul>
229
-
230
-
231
-
232
-
233
- <div id="instance_method_details" class="method_details_list">
234
- <h2>Instance Method Details</h2>
235
-
236
-
237
- <div class="method_details first">
238
- <p class="signature first" id="become-instance_method">
239
-
240
- - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>become</strong>(next_state_name)
241
-
242
-
243
-
244
- </p><div class="docstring">
245
- <div class="discussion">
246
-
247
- <p>Put the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> into the <tt>next_state_name</tt>.</p>
248
-
249
-
250
- </div>
251
- </div>
252
- <div class="tags">
253
- <h3>Parameters:</h3>
254
- <ul class="param">
255
-
256
- <li>
257
-
258
- <span class='name'>next_state_name</span>
259
-
260
-
261
- <span class='type'>(<tt>String</tt>)</span>
262
-
263
-
264
-
265
- &mdash;
266
- <div class='inline'>
267
- <p>name of new state</p>
268
- </div>
269
-
270
- </li>
271
-
272
- </ul>
273
-
274
-
275
- </div><table class="source_code">
276
- <tr>
277
- <td>
278
- <pre class="lines">
279
-
280
-
281
- 76
282
- 77
283
- 78</pre>
284
- </td>
285
- <td>
286
- <pre class="code"><span class="info file"># File 'lib/mocha/state_machine.rb', line 76</span>
287
-
288
- <span class='kw'>def</span> <span class='id identifier rubyid_become'>become</span><span class='lparen'>(</span><span class='id identifier rubyid_next_state_name'>next_state_name</span><span class='rparen'>)</span>
289
- <span class='ivar'>@current_state</span> <span class='op'>=</span> <span class='id identifier rubyid_next_state_name'>next_state_name</span>
290
- <span class='kw'>end</span></pre>
291
- </td>
292
- </tr>
293
- </table>
294
- </div>
295
-
296
- <div class="method_details ">
297
- <p class="signature " id="is-instance_method">
298
-
299
- - (<tt><span class='object_link'><a href="StateMachine/State.html" title="Mocha::StateMachine::State (class)">State</a></span></tt>) <strong>is</strong>(state_name)
300
-
301
-
302
-
303
- </p><div class="docstring">
304
- <div class="discussion">
305
-
306
- <p>Provides a mechanism to change the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> into the state specified
307
- by <tt>state_name</tt> at some point in the future.</p>
308
-
309
- <p>Or provides a mechanism to determine whether the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> is in the
310
- state specified by <tt>state_name</tt> at some point in the future.</p>
311
-
312
-
313
- </div>
314
- </div>
315
- <div class="tags">
316
- <h3>Parameters:</h3>
317
- <ul class="param">
318
-
319
- <li>
320
-
321
- <span class='name'>state_name</span>
322
-
323
-
324
- <span class='type'>(<tt>String</tt>)</span>
325
-
326
-
327
-
328
- &mdash;
329
- <div class='inline'>
330
- <p>name of new state</p>
331
- </div>
332
-
333
- </li>
334
-
335
- </ul>
336
-
337
- <h3>Returns:</h3>
338
- <ul class="return">
339
-
340
- <li>
341
-
342
-
343
- <span class='type'>(<tt><span class='object_link'><a href="StateMachine/State.html" title="Mocha::StateMachine::State (class)">State</a></span></tt>)</span>
344
-
345
-
346
-
347
- &mdash;
348
- <div class='inline'>
349
- <p>state which, when activated, will change the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> into the state
350
- with the specified <tt>state_name</tt>.</p>
351
- </div>
352
-
353
- </li>
354
-
355
- </ul>
356
-
357
- </div><table class="source_code">
358
- <tr>
359
- <td>
360
- <pre class="lines">
361
-
362
-
363
- 86
364
- 87
365
- 88</pre>
366
- </td>
367
- <td>
368
- <pre class="code"><span class="info file"># File 'lib/mocha/state_machine.rb', line 86</span>
369
-
370
- <span class='kw'>def</span> <span class='id identifier rubyid_is'>is</span><span class='lparen'>(</span><span class='id identifier rubyid_state_name'>state_name</span><span class='rparen'>)</span>
371
- <span class='const'>State</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_state_name'>state_name</span><span class='rparen'>)</span>
372
- <span class='kw'>end</span></pre>
373
- </td>
374
- </tr>
375
- </table>
376
- </div>
377
-
378
- <div class="method_details ">
379
- <p class="signature " id="is_not-instance_method">
380
-
381
- - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>is_not</strong>(state_name)
382
-
383
-
384
-
385
- </p><div class="docstring">
386
- <div class="discussion">
387
-
388
- <p>Provides a mechanism to determine whether the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> is not in the
389
- state specified by <tt>state_name</tt> at some point in the future.</p>
390
-
391
-
392
- </div>
393
- </div>
394
- <div class="tags">
395
-
396
-
397
- </div><table class="source_code">
398
- <tr>
399
- <td>
400
- <pre class="lines">
401
-
402
-
403
- 91
404
- 92
405
- 93</pre>
406
- </td>
407
- <td>
408
- <pre class="code"><span class="info file"># File 'lib/mocha/state_machine.rb', line 91</span>
409
-
410
- <span class='kw'>def</span> <span class='id identifier rubyid_is_not'>is_not</span><span class='lparen'>(</span><span class='id identifier rubyid_state_name'>state_name</span><span class='rparen'>)</span>
411
- <span class='const'>StatePredicate</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_state_name'>state_name</span><span class='rparen'>)</span>
412
- <span class='kw'>end</span></pre>
413
- </td>
414
- </tr>
415
- </table>
416
- </div>
417
-
418
- <div class="method_details ">
419
- <p class="signature " id="starts_as-instance_method">
420
-
421
- - (<tt><span class='object_link'><a href="" title="Mocha::StateMachine (class)">StateMachine</a></span></tt>) <strong>starts_as</strong>(initial_state_name)
422
-
423
-
424
-
425
- </p><div class="docstring">
426
- <div class="discussion">
427
-
428
- <p>Put the <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> into the state specified by
429
- <tt>initial_state_name</tt>.</p>
430
-
431
-
432
- </div>
433
- </div>
434
- <div class="tags">
435
- <h3>Parameters:</h3>
436
- <ul class="param">
437
-
438
- <li>
439
-
440
- <span class='name'>initial_state_name</span>
441
-
442
-
443
- <span class='type'>(<tt>String</tt>)</span>
444
-
445
-
446
-
447
- &mdash;
448
- <div class='inline'>
449
- <p>name of initial state</p>
450
- </div>
451
-
452
- </li>
453
-
454
- </ul>
455
-
456
- <h3>Returns:</h3>
457
- <ul class="return">
458
-
459
- <li>
460
-
461
-
462
- <span class='type'>(<tt><span class='object_link'><a href="" title="Mocha::StateMachine (class)">StateMachine</a></span></tt>)</span>
463
-
464
-
465
-
466
- &mdash;
467
- <div class='inline'>
468
- <p>state machine, thereby allowing invocations of other <span class='object_link'><a href="" title="Mocha::StateMachine (class)">Mocha::StateMachine</a></span> methods
469
- to be chained.</p>
470
- </div>
471
-
472
- </li>
473
-
474
- </ul>
475
-
476
- </div><table class="source_code">
477
- <tr>
478
- <td>
479
- <pre class="lines">
480
-
481
-
482
- 68
483
- 69
484
- 70
485
- 71</pre>
486
- </td>
487
- <td>
488
- <pre class="code"><span class="info file"># File 'lib/mocha/state_machine.rb', line 68</span>
489
-
490
- <span class='kw'>def</span> <span class='id identifier rubyid_starts_as'>starts_as</span><span class='lparen'>(</span><span class='id identifier rubyid_initial_state_name'>initial_state_name</span><span class='rparen'>)</span>
491
- <span class='id identifier rubyid_become'>become</span><span class='lparen'>(</span><span class='id identifier rubyid_initial_state_name'>initial_state_name</span><span class='rparen'>)</span>
492
- <span class='kw'>self</span>
493
- <span class='kw'>end</span></pre>
494
- </td>
495
- </tr>
496
- </table>
497
- </div>
498
-
499
- </div>
500
-
501
- </div>
502
-
503
- <div id="footer">
504
- Generated on Wed Apr 25 16:51:31 2012 by
505
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
506
- 0.7.5 (ruby-1.9.3).
507
- </div>
508
-
509
- </body>
510
- </html>