hardmock 1.1.0

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.
@@ -0,0 +1,34 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/../test_helper")
2
+ require 'hardmock'
3
+
4
+ class VerifyErrorTest < Test::Unit::TestCase
5
+
6
+ #
7
+ # TESTS
8
+ #
9
+
10
+ def test_formatted_list_of_unmet_expectations
11
+ mock1 = Mock.new('mock1')
12
+ mock2 = Mock.new('mock2')
13
+ exp1 = SimpleExpectation.new( :mock => mock1, :method => 'send_parts', :arguments => [1,2,:a] )
14
+ exp2 = SimpleExpectation.new( :mock => mock2, :method => 'grind_it', :arguments => [] )
15
+
16
+ exp_list = [ exp1, exp2 ]
17
+
18
+ err = VerifyError.new("This is the error", exp_list)
19
+ assert_equal "This is the error:\n * #{exp1.to_s}\n * #{exp2.to_s}", err.message
20
+ end
21
+
22
+ def test_empty_list_of_expectations
23
+ # this is not a normal case; not spending a lot of time to make this better
24
+ exp_list = []
25
+ err = VerifyError.new("This is the error:\n", exp_list)
26
+ end
27
+
28
+ def test_nil_expectation_list
29
+ # this is not a normal case; not spending a lot of time to make this better
30
+ exp_list = []
31
+ err = VerifyError.new("This is the error:\n", exp_list)
32
+ end
33
+
34
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: hardmock
5
+ version: !ruby/object:Gem::Version
6
+ version: 1.1.0
7
+ date: 2006-12-10 00:00:00 -05:00
8
+ summary: A strict, ordered, expectation-oriented mock object library.
9
+ require_paths:
10
+ - lib
11
+ email: crosby@atomicobject.com
12
+ homepage: http://hardmock.rubyforge.org
13
+ rubyforge_project: hardmock
14
+ description:
15
+ autorequire: hardmock
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ authors:
29
+ - David Crosby
30
+ files:
31
+ - lib/hardmock.rb
32
+ - lib/method_cleanout.rb
33
+ - test/test_helper.rb
34
+ - test/unit/verify_error_test.rb
35
+ - test/unit/mock_test.rb
36
+ - test/unit/method_cleanout_test.rb
37
+ - test/unit/trapper_test.rb
38
+ - test/unit/mock_control_test.rb
39
+ - test/unit/expector_test.rb
40
+ - test/unit/simple_expectation_test.rb
41
+ - test/unit/expectation_builder_test.rb
42
+ - test/functional/direct_mock_usage_test.rb
43
+ - test/functional/hardmock_test.rb
44
+ - test/functional/assert_error_test.rb
45
+ - test/functional/auto_verify_test.rb
46
+ - LICENSE
47
+ - Rakefile
48
+ - README
49
+ - CHANGES
50
+ test_files:
51
+ - test/unit/verify_error_test.rb
52
+ - test/unit/mock_test.rb
53
+ - test/unit/method_cleanout_test.rb
54
+ - test/unit/trapper_test.rb
55
+ - test/unit/mock_control_test.rb
56
+ - test/unit/expector_test.rb
57
+ - test/unit/simple_expectation_test.rb
58
+ - test/unit/expectation_builder_test.rb
59
+ - test/functional/direct_mock_usage_test.rb
60
+ - test/functional/hardmock_test.rb
61
+ - test/functional/assert_error_test.rb
62
+ - test/functional/auto_verify_test.rb
63
+ rdoc_options:
64
+ - --line-numbers
65
+ - --inline-source
66
+ - --main
67
+ - README
68
+ - --title
69
+ - Hardmock
70
+ extra_rdoc_files:
71
+ - README
72
+ - CHANGES
73
+ - LICENSE
74
+ executables: []
75
+
76
+ extensions: []
77
+
78
+ requirements: []
79
+
80
+ dependencies: []
81
+