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 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.6'
94
+ s.version = '0.0.7'
95
95
  s.platform = Gem::Platform::RUBY
96
96
  s.rubyforge_project = "synthesis"
97
97
  s.summary, s.description = 'A tool for Synthesized Testing'
@@ -2,13 +2,15 @@ require "rubygems"
2
2
  require "mocha_standalone"
3
3
  require "expectations"
4
4
 
5
- $: << File.dirname(__FILE__) + "/../../"
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
- mock_object_type Class::AnyInstance
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
- mock_object_type Spec::Mocks::Mock
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
 
@@ -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 mock_object_type(type)
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.6
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-09 00:00:00 +00:00
12
+ date: 2008-03-10 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15