synthesis 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -71,6 +71,10 @@ Reporting the location (filename and line number) of tested/untested expectation
71
71
 
72
72
  Danilo Sato, Paul Nasrat
73
73
 
74
+ == Discuss
75
+
76
+ http://groups.google.com/group/synthesized-testing
77
+
74
78
  == Related reading
75
79
 
76
80
  * Synthesized Testing: A Primer ( http://nutrun.com/weblog/synthesized-testing-a-primer )
data/Rakefile CHANGED
@@ -91,7 +91,7 @@ end
91
91
 
92
92
  gem_spec = Gem::Specification.new do |s|
93
93
  s.name = 'synthesis'
94
- s.version = '0.0.12'
94
+ s.version = '0.0.13'
95
95
  s.platform = Gem::Platform::RUBY
96
96
  s.rubyforge_project = "synthesis"
97
97
  s.summary, s.description = 'A tool for Synthesized Testing'
@@ -72,7 +72,7 @@ module Synthesis
72
72
  end
73
73
 
74
74
  def ignore?(obj)
75
- ignored.include?(obj.class) || ignored.include?(obj) || obj.is_a?(MOCK_OBJECT)
75
+ ignored.include?(obj.class) || (obj.is_a?(Class) && ignored.include?(obj)) || obj.is_a?(MOCK_OBJECT)
76
76
  end
77
77
 
78
78
  def reset!
@@ -22,7 +22,7 @@ module Synthesis
22
22
  STDERR.puts "DEPRECATION WARNING!!!"
23
23
  STDERR.puts caller[0]
24
24
  STDERR.puts "Synthesis::Task#ignore(*classes) has been deprecated."
25
- STDERR.puts "Use Synthesis::Task#ignored = %w[#{classes * ','}] instead."
25
+ STDERR.puts "Use Synthesis::Task#ignored = [#{classes * ','}] instead."
26
26
  STDERR.puts
27
27
  @ignored << classes
28
28
  @ignored.flatten!
@@ -41,6 +41,12 @@ module Synthesis
41
41
  assert ExpectationRecord.expectations.empty?
42
42
  end
43
43
 
44
+ def test_does_not_add_expectation_for_ignored_object
45
+ ExpectationRecord.ignore(Hash)
46
+ ExpectationRecord.add_expectation(Hash.new, :foo, :track)
47
+ assert ExpectationRecord.expectations.empty?
48
+ end
49
+
44
50
  def test_returns_added_expectation_on_add
45
51
  expected = Expectation.new(Hash, :foo, :track, [], [:return_val])
46
52
  actual = ExpectationRecord.add_expectation(Hash, :foo, :track)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synthesis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Caborn, George Malamidis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-17 00:00:00 +01:00
12
+ date: 2008-05-19 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15