synthesis 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/synthesis/adapter/expectations.rb +6 -5
- data/lib/synthesis/adapter/mocha.rb +1 -1
- data/lib/synthesis/adapter/rspec.rb +1 -1
- data/lib/synthesis/adapter.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -2,13 +2,15 @@ require "rubygems"
|
|
2
2
|
require "mocha_standalone"
|
3
3
|
require "expectations"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
require "synthesis"
|
8
|
-
require "synthesis/adapter/mocha"
|
5
|
+
require File.dirname(__FILE__) + "/../../synthesis"
|
9
6
|
|
10
7
|
module Synthesis
|
11
8
|
class ExpectationsAdapter < Adapter
|
9
|
+
|
10
|
+
ignore_instances_of Class::AnyInstance
|
11
|
+
expectation_class Mocha::Expectation
|
12
|
+
intercept :method => :expects, :on => Object
|
13
|
+
|
12
14
|
def run
|
13
15
|
fail_unless { Expectations::SuiteRunner.instance.suite.execute }
|
14
16
|
end
|
@@ -20,4 +22,3 @@ class Expectations::SuiteRunner
|
|
20
22
|
self.suite = Expectations::Suite.new
|
21
23
|
end
|
22
24
|
end
|
23
|
-
|
@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + "/../../synthesis"
|
|
7
7
|
module Synthesis
|
8
8
|
class MochaAdapter < Adapter
|
9
9
|
|
10
|
-
|
10
|
+
ignore_instances_of Class::AnyInstance
|
11
11
|
expectation_class Mocha::Expectation
|
12
12
|
intercept :method => :expects, :on => Object
|
13
13
|
|
@@ -7,7 +7,7 @@ require File.dirname(__FILE__) + "/../../synthesis"
|
|
7
7
|
module Synthesis
|
8
8
|
class RSpecAdapter < Adapter
|
9
9
|
|
10
|
-
|
10
|
+
ignore_instances_of Spec::Mocks::Mock
|
11
11
|
expectation_class Spec::Mocks::MessageExpectation
|
12
12
|
intercept :method => :should_receive, :on => Spec::Mocks::Methods
|
13
13
|
|
data/lib/synthesis/adapter.rb
CHANGED
@@ -23,7 +23,7 @@ module Synthesis
|
|
23
23
|
class << self
|
24
24
|
# The type of object representing a mock or stub for the test framework.
|
25
25
|
# Objects of this type will be ignored by Synthesis.
|
26
|
-
def
|
26
|
+
def ignore_instances_of(type)
|
27
27
|
Synthesis.const_set(:MOCK_OBJECT, type)
|
28
28
|
end
|
29
29
|
|
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.7
|
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-03-
|
12
|
+
date: 2008-03-10 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|