synthesis 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -2
- data/Rakefile +2 -2
- data/lib/synthesis/expectation_record.rb +1 -2
- data/lib/synthesis/task.rb +11 -3
- metadata +2 -2
data/README
CHANGED
@@ -42,7 +42,7 @@ To use with Test::Unit and Mocha, ignoring Array and Hash:
|
|
42
42
|
|
43
43
|
Synthesis::Task.new do |t|
|
44
44
|
t.pattern = 'test/unit/**/*_test.rb'
|
45
|
-
t.
|
45
|
+
t.ignored = %w[Array, Hash]
|
46
46
|
end
|
47
47
|
|
48
48
|
To use with RSpec, running all specs in the <tt>spec</tt> directory:
|
@@ -74,6 +74,7 @@ Danilo Sato, Paul Nasrat
|
|
74
74
|
== Related reading
|
75
75
|
|
76
76
|
* Synthesized Testing: A Primer ( http://nutrun.com/weblog/synthesized-testing-a-primer )
|
77
|
+
* Confidence as a test code metric ( http://nutrun.com/weblog/confidence-as-a-test-code-metric )
|
77
78
|
* Using Synthesis With Test::Unit and Mocha ( http://nutrun.com/weblog/using-synthesis-with-testunit-and-mocha )
|
78
79
|
* Using Synthesis With Expectations ( http://nutrun.com/weblog/using-synthesis-with-expectations )
|
79
|
-
* Synthesis validates simulated method calls taking method signature arguments into account ( http://nutrun.com/weblog/synthesis-002 )
|
80
|
+
* Synthesis validates simulated method calls taking method signature arguments into account ( http://nutrun.com/weblog/synthesis-002 )
|
data/Rakefile
CHANGED
@@ -37,7 +37,7 @@ end
|
|
37
37
|
|
38
38
|
Synthesis::Task.new do |t|
|
39
39
|
t.pattern = 'test_project/mocha/test/*_test.rb'
|
40
|
-
t.
|
40
|
+
t.ignored = %w[Array Hash]
|
41
41
|
# t.out = File.new('synthesis.test.txt', 'a')
|
42
42
|
end
|
43
43
|
|
@@ -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.
|
94
|
+
s.version = '0.0.12'
|
95
95
|
s.platform = Gem::Platform::RUBY
|
96
96
|
s.rubyforge_project = "synthesis"
|
97
97
|
s.summary, s.description = 'A tool for Synthesized Testing'
|
@@ -22,7 +22,6 @@ module Synthesis
|
|
22
22
|
# the +Expectation+ will be added when obj.expects(:method) is called
|
23
23
|
# the +Expectation+ arguments will be added when .with(:args) is called
|
24
24
|
@expectations ||= []
|
25
|
-
@expectations
|
26
25
|
end
|
27
26
|
|
28
27
|
def ignored
|
@@ -30,7 +29,7 @@ module Synthesis
|
|
30
29
|
end
|
31
30
|
|
32
31
|
def [](matcher)
|
33
|
-
# Using a hash
|
32
|
+
# Using a hash for faster look up of expectations
|
34
33
|
# when recording invocations
|
35
34
|
expectations_hash[matcher] || Expectation::NilExpectation.new
|
36
35
|
end
|
data/lib/synthesis/task.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require
|
3
|
-
require
|
2
|
+
require "rake"
|
3
|
+
require "rake/tasklib"
|
4
|
+
require File.dirname(__FILE__) + "/../synthesis/logging"
|
4
5
|
|
5
6
|
module Synthesis
|
6
7
|
class Task < Rake::TaskLib
|
7
|
-
|
8
|
+
include Logging
|
9
|
+
attr_accessor :verbose, :pattern, :ruby_opts, :adapter, :out, :ignored
|
8
10
|
|
9
11
|
def initialize(name='synthesis:test')
|
10
12
|
@name, @ignored = name, []
|
@@ -16,6 +18,12 @@ module Synthesis
|
|
16
18
|
end
|
17
19
|
|
18
20
|
def ignore(*classes)
|
21
|
+
STDERR.puts
|
22
|
+
STDERR.puts "DEPRECATION WARNING!!!"
|
23
|
+
STDERR.puts caller[0]
|
24
|
+
STDERR.puts "Synthesis::Task#ignore(*classes) has been deprecated."
|
25
|
+
STDERR.puts "Use Synthesis::Task#ignored = %w[#{classes * ','}] instead."
|
26
|
+
STDERR.puts
|
19
27
|
@ignored << classes
|
20
28
|
@ignored.flatten!
|
21
29
|
end
|
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.
|
4
|
+
version: 0.0.12
|
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-
|
12
|
+
date: 2008-05-17 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|