minitest-context 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Context
3
- VERSION = "0.3.1"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -24,7 +24,7 @@ class MiniTest::Spec
24
24
  class_eval &context
25
25
  end
26
26
  else
27
- raise ArgumentError, "No context with #{name} found."
27
+ raise ArgumentError, "No context by name '#{name}' found."
28
28
  end
29
29
  end
30
30
 
@@ -1,5 +1,5 @@
1
1
  MiniTest::Context.define(:before_block) do
2
2
  before do
3
- @example = [1,2,3]
3
+ @subject = [1,2,3]
4
4
  end
5
5
  end
@@ -1,11 +1,11 @@
1
1
  MiniTest::Context.define(:stacked_context) do
2
2
  before do
3
- @number ||= 1
3
+ @subject = 1
4
4
  end
5
5
  end
6
6
 
7
7
  MiniTest::Context.define(:stacked_context) do
8
8
  before do
9
- @number += 1
9
+ @subject += 1
10
10
  end
11
11
  end
@@ -4,8 +4,8 @@ describe "Contexts" do
4
4
  describe "An inherited context." do
5
5
  inherit_context :before_block
6
6
 
7
- it "must assign an Array to @example." do
8
- @example.must_be_instance_of(Array)
7
+ it "must assign an Array to @subject." do
8
+ @subject.must_equal([1,2,3])
9
9
  end
10
10
  end
11
11
 
@@ -14,13 +14,13 @@ describe "Contexts" do
14
14
 
15
15
  describe "Suite 1" do
16
16
  it "must inherit the context from the parent suite." do
17
- @example.must_be_instance_of(Array)
17
+ @subject.must_equal([1,2,3])
18
18
  end
19
19
  end
20
20
 
21
21
  describe "Suite 2" do
22
22
  it "must inherit the context from the parent suite." do
23
- @example.must_be_instance_of(Array)
23
+ @subject.must_equal([1,2,3])
24
24
  end
25
25
  end
26
26
  end
@@ -29,7 +29,7 @@ describe "Contexts" do
29
29
  inherit_context :stacked_context
30
30
 
31
31
  it "must inherit all stacked contexts." do
32
- @number.must_equal(2)
32
+ @subject.must_equal(2)
33
33
  end
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-context
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - robgleeson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-02 00:00:00 +01:00
18
+ date: 2011-10-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency