assert 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -281,7 +281,7 @@ class Assert::Test
281
281
  # classic test/unit style setup
282
282
  def setup; @setup_tusm = @testunit_style_msg; end
283
283
  end
284
- @test = Factory.test("something", @context_class) do
284
+ @test = Factory.test("something", Factory.context_info(@context_class)) do
285
285
  assert @assert_style_msg
286
286
  assert @testunit_style_msg
287
287
 
@@ -331,7 +331,7 @@ class Assert::Test
331
331
  instance_variable_set("@message", @testunit_style_msg)
332
332
  end
333
333
  end
334
- @test = Factory.test("something amazing", @context_class) do
334
+ @test = Factory.test("something amazing", Factory.context_info(@context_class)) do
335
335
  assert(true) # first pass result
336
336
  assert(true) # last pass result
337
337
  end
@@ -339,7 +339,6 @@ class Assert::Test
339
339
  end
340
340
 
341
341
  should "have a passing result for each teardown type" do
342
- puts subject.results.inspect
343
342
  assert_equal 2, subject.result_count
344
343
  assert_equal 2, subject.result_count(:pass)
345
344
  end
@@ -11,17 +11,18 @@ class Assert::Test
11
11
  @context_class = Factory.context_class do
12
12
  desc context_desc
13
13
  end
14
- @test = Factory.test(test_name, @context_class, @test_code)
14
+ @context_info = Factory.context_info(@context_class)
15
+ @test = Factory.test(test_name, @context_info, @test_code)
15
16
  @expected_name = [ context_desc, test_name.gsub(/^test:\s+should/, "should") ].join(" ")
16
17
  end
17
18
  teardown do
18
- TEST_ASSERT_SUITE.clear
19
+ TEST_ASSERT_SUITE.tests.clear
19
20
  end
20
21
  subject{ @test }
21
22
 
22
- should have_readers :name, :code, :context_class
23
+ should have_readers :name, :code, :context_info
23
24
  should have_accessor :results, :output
24
- should have_instance_methods :run, :result_count
25
+ should have_instance_methods :run, :result_count, :context_class
25
26
  should have_instance_methods *Assert::Result.types.keys.collect{|k| "#{k}_results".to_sym }
26
27
 
27
28
  should "set it's test name to the context description with the passed in name cleaned" do
@@ -38,7 +39,7 @@ class Assert::Test
38
39
  end
39
40
 
40
41
  should "have a custom inspect that only shows limited attributes" do
41
- attributes_string = [ :name, :context_class, :results ].collect do |method|
42
+ attributes_string = [ :name, :context_info, :results ].collect do |method|
42
43
  "@#{method}=#{subject.send(method).inspect}"
43
44
  end.join(" ")
44
45
  expected = "#<#{subject.class} #{attributes_string}>"
@@ -55,7 +56,7 @@ class Assert::Test
55
56
 
56
57
  class PassFailIgnoreTest < ResultsTest
57
58
  setup do
58
- @test = Factory.test("pass fail ignore test", @context_class) do
59
+ @test = Factory.test("pass fail ignore test", @context_info) do
59
60
  ignore("something")
60
61
  assert(true)
61
62
  assert(false)
@@ -113,7 +114,7 @@ class Assert::Test
113
114
 
114
115
  class SkipHandlingTest < ResultsTest
115
116
  setup do
116
- @test = Factory.test("skip test", @context_class) { skip }
117
+ @test = Factory.test("skip test", @context_info) { skip }
117
118
  @test.run
118
119
  end
119
120
  subject{ @test }
@@ -136,7 +137,7 @@ class Assert::Test
136
137
 
137
138
  class ErrorHandlingTest < ResultsTest
138
139
  setup do
139
- @test = Factory.test("error test", @context_class) do
140
+ @test = Factory.test("error test", @context_info) do
140
141
  raise StandardError, "WHAT"
141
142
  end
142
143
  @test.run
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assert
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 6
8
+ - 7
9
9
  - 0
10
- version: 0.6.0
10
+ version: 0.7.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-09-09 00:00:00 Z
19
+ date: 2011-10-11 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  type: :development
@@ -41,11 +41,11 @@ dependencies:
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- hash: 13
44
+ hash: 3
45
45
  segments:
46
46
  - 0
47
- - 3
48
- version: "0.3"
47
+ - 4
48
+ version: "0.4"
49
49
  version_requirements: *id002
50
50
  name: assert-view
51
51
  description: Test::Unit style testing framework, just better than Test::Unit.
@@ -59,6 +59,7 @@ extra_rdoc_files: []
59
59
 
60
60
  files:
61
61
  - .gitignore
62
+ - CHANGELOG.rdoc
62
63
  - Gemfile
63
64
  - Gemfile.lock
64
65
  - README.rdoc
@@ -72,6 +73,9 @@ files:
72
73
  - lib/assert/macros/methods.rb
73
74
  - lib/assert/options.rb
74
75
  - lib/assert/rake_tasks.rb
76
+ - lib/assert/rake_tasks/irb.rb
77
+ - lib/assert/rake_tasks/scope.rb
78
+ - lib/assert/rake_tasks/test_task.rb
75
79
  - lib/assert/result.rb
76
80
  - lib/assert/result_set.rb
77
81
  - lib/assert/runner.rb
@@ -114,13 +118,23 @@ files:
114
118
  - test/default_view_test.rb
115
119
  - test/fixtures/inherited_stuff.rb
116
120
  - test/fixtures/sample_context.rb
121
+ - test/fixtures/test_root/one_test.rb
122
+ - test/fixtures/test_root/parent/area_one/area_test.rb
123
+ - test/fixtures/test_root/shallow/deeply/nested_test.rb
124
+ - test/fixtures/test_root/shallow/nested_test.rb
125
+ - test/fixtures/test_root/shallow_test.rb
126
+ - test/fixtures/test_root/two_test.rb
117
127
  - test/helper.rb
118
128
  - test/irb.rb
119
129
  - test/macro_test.rb
120
130
  - test/options_test.rb
131
+ - test/rake_tasks/irb_test.rb
132
+ - test/rake_tasks/scope_test.rb
133
+ - test/rake_tasks/test_task_test.rb
121
134
  - test/result_set_test.rb
122
135
  - test/result_test.rb
123
136
  - test/runner_test.rb
137
+ - test/suite/context_info_test.rb
124
138
  - test/suite_test.rb
125
139
  - test/test/running_test.rb
126
140
  - test/test_test.rb
@@ -187,13 +201,23 @@ test_files:
187
201
  - test/default_view_test.rb
188
202
  - test/fixtures/inherited_stuff.rb
189
203
  - test/fixtures/sample_context.rb
204
+ - test/fixtures/test_root/one_test.rb
205
+ - test/fixtures/test_root/parent/area_one/area_test.rb
206
+ - test/fixtures/test_root/shallow/deeply/nested_test.rb
207
+ - test/fixtures/test_root/shallow/nested_test.rb
208
+ - test/fixtures/test_root/shallow_test.rb
209
+ - test/fixtures/test_root/two_test.rb
190
210
  - test/helper.rb
191
211
  - test/irb.rb
192
212
  - test/macro_test.rb
193
213
  - test/options_test.rb
214
+ - test/rake_tasks/irb_test.rb
215
+ - test/rake_tasks/scope_test.rb
216
+ - test/rake_tasks/test_task_test.rb
194
217
  - test/result_set_test.rb
195
218
  - test/result_test.rb
196
219
  - test/runner_test.rb
220
+ - test/suite/context_info_test.rb
197
221
  - test/suite_test.rb
198
222
  - test/test/running_test.rb
199
223
  - test/test_test.rb