rspec 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +9 -1
- data/README +1 -0
- data/Rakefile +14 -6
- data/doc/README +1 -1
- data/doc/reference/rspec reference.page +0 -0
- data/doc/src/community.page +0 -1
- data/doc/src/default.template +1 -3
- data/doc/src/documentation/api.page +36 -35
- data/doc/src/documentation/index.page +9 -4
- data/doc/src/documentation/meta.info +22 -0
- data/doc/src/documentation/mocks.page +68 -32
- data/doc/src/download.page +0 -1
- data/doc/src/examples.page +1 -2
- data/doc/src/index.page +0 -1
- data/doc/src/meta.info +23 -0
- data/doc/src/tools/index.page +139 -4
- data/doc/src/tools/meta.info +12 -0
- data/doc/src/tools/rails.page +0 -1
- data/doc/src/tools/rake.page +0 -1
- data/doc/src/tools/test2rspec.page +10 -3
- data/doc/src/why_rspec.page +0 -1
- data/examples/airport_spec.rb +14 -4
- data/examples/empty_stack_spec.rb +21 -0
- data/examples/stack_spec.rb +4 -1
- data/lib/spec.rb +2 -1
- data/lib/spec/api/helper/should_helper.rb +5 -4
- data/lib/spec/api/helper/should_negator.rb +2 -0
- data/lib/spec/api/mock.rb +4 -7
- data/lib/spec/runner/backtrace_tweaker.rb +3 -4
- data/lib/spec/runner/execution_context.rb +4 -0
- data/lib/spec/runner/kernel_ext.rb +1 -2
- data/lib/spec/runner/option_parser.rb +12 -7
- data/lib/spec/version.rb +10 -7
- data/test/spec/api/helper/raising_test.rb +12 -0
- data/test/spec/api/helper/should_satisfy_test.rb +8 -6
- data/test/spec/api/mock_arg_constraints_test.rb +1 -10
- data/test/spec/api/mock_test.rb +71 -2
- data/test/spec/runner/context_runner_test.rb +23 -0
- data/test/spec/runner/context_test.rb +41 -0
- data/test/spec/runner/execution_context_test.rb +7 -0
- data/test/spec/runner/kernel_ext_test.rb +14 -0
- data/test/spec/runner/option_parser_test.rb +17 -10
- metadata +8 -8
- data/doc/src/documentation/specs.page +0 -20
- data/doc/src/tools/rcov.page +0 -8
- data/doc/src/tools/spec_runner.page +0 -8
- data/doc/src/tools/specdoc.page +0 -8
@@ -1,20 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Writing Specifications
|
3
|
-
inMenu: true
|
4
|
-
ordering: 2
|
5
|
-
---
|
6
|
-
h2. Writing Specifications
|
7
|
-
|
8
|
-
An RSpec specification is a Ruby file with a context and one or more specifications. Example:
|
9
|
-
|
10
|
-
context "Stack" do
|
11
|
-
specify "should return top when sent top" do
|
12
|
-
stack = Stack.new
|
13
|
-
stack.push 3
|
14
|
-
stack.top.should.be 3
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
A context represents a collection of specifications and must be defined with a name and a block (do-end).
|
19
|
-
A specification is defined with the *specify* keyword and a sentence describing what's being specified.
|
20
|
-
It is highly recommended to include
|
data/doc/src/tools/rcov.page
DELETED