kintama 0.1.5 → 0.1.6

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.
@@ -4,8 +4,8 @@ module Kintama
4
4
  raise Kintama::TestFailure, message unless expression
5
5
  end
6
6
 
7
- def flunk
8
- assert false, "flunked."
7
+ def flunk(message="flunked.")
8
+ assert false, message
9
9
  end
10
10
 
11
11
  def assert_equal(expected, actual, message="Expected #{expected.inspect} but got #{actual.inspect}")
@@ -105,6 +105,22 @@ class LineBasedRunningTest < Test::Unit::TestCase
105
105
  assert_match /Nothing runnable found on line 1/, run_test(test_file, "--line 1")
106
106
  end
107
107
 
108
+ def test_should_run_startup_blocks_from_outer_parents
109
+ test_file = %{
110
+ context "outer" do
111
+ on_start { $started = '123' }
112
+ context "inner" do
113
+ context "deeply inner" do
114
+ should "have run startup" do
115
+ assert_equal '123', $started
116
+ end
117
+ end
118
+ end
119
+ end}
120
+ assert_match /#{passing("should have run startup")}/, run_test(test_file, "--line 9")
121
+ assert_match /^1 tests, 0 failures/, run_test(test_file, "--line 9")
122
+ end
123
+
108
124
  private
109
125
 
110
126
  def write_test(string, path)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kintama
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease: false
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Adam
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-04 00:00:00 +01:00
18
+ date: 2011-04-29 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements: []
86
86
 
87
87
  rubyforge_project:
88
- rubygems_version: 1.3.7
88
+ rubygems_version: 1.4.1
89
89
  signing_key:
90
90
  specification_version: 3
91
91
  summary: It's for writing tests.