synthesis 0.1.3 → 0.1.4
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.
- data/Rakefile +1 -1
- data/lib/synthesis/expectation_record_enabled.rb +8 -2
- data/lib/synthesis/runner.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -11,12 +11,17 @@ module Synthesis
|
|
11
11
|
class_eval do
|
12
12
|
alias_method "intercepted_#{method_name}", method_name
|
13
13
|
|
14
|
-
define_method(
|
14
|
+
define_method(:get_expectation_method_name) {method_name}
|
15
|
+
|
16
|
+
def temp_expectation_record(meth, *expected_parameters, &matching_block)
|
15
17
|
s_expectation = ExpectationRecord.add_expectation(self, meth, caller[0])
|
16
|
-
m_expectation = send("intercepted_#{
|
18
|
+
m_expectation = send("intercepted_#{get_expectation_method_name}", meth, *expected_parameters, &matching_block)
|
17
19
|
m_expectation.synthesis_expectation = s_expectation
|
18
20
|
m_expectation
|
19
21
|
end
|
22
|
+
|
23
|
+
alias_method method_name, :temp_expectation_record
|
24
|
+
undef temp_expectation_record
|
20
25
|
end
|
21
26
|
end
|
22
27
|
|
@@ -27,6 +32,7 @@ module Synthesis
|
|
27
32
|
class_eval do
|
28
33
|
alias_method method_name, "intercepted_#{method_name}"
|
29
34
|
remove_method "intercepted_#{method_name}"
|
35
|
+
remove_method :get_expectation_method_name
|
30
36
|
end
|
31
37
|
end
|
32
38
|
end
|
data/lib/synthesis/runner.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.4
|
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-06-
|
12
|
+
date: 2008-06-16 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|