rr 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ * 0.3.1
2
+ - Automatically require Test::Unit and Rspec adapters
3
+
1
4
  * 0.3.0
2
5
  - ScenarioCreator strategy method chaining
3
6
  - Removed mock_probe
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ def run_suite
21
21
  end
22
22
 
23
23
  PKG_NAME = "rr"
24
- PKG_VERSION = "0.3.0"
24
+ PKG_VERSION = "0.3.1"
25
25
  PKG_FILES = FileList[
26
26
  '[A-Z]*',
27
27
  '*.rb',
@@ -4,7 +4,6 @@ require "examples/rr/space/space_helper"
4
4
  require "examples/rr/expectations/times_called_expectation/times_called_expectation_helper"
5
5
  require "examples/rr/extensions/instance_methods_example_helper"
6
6
 
7
- require "rr/adapters/rspec"
8
7
  Spec::Runner.configure do |config|
9
8
  config.mock_with RR::Adapters::Rspec
10
9
  end
@@ -21,4 +21,12 @@ describe RR, " backtrace tweaking" do
21
21
 
22
22
  output.string.should_not include("lib/rr")
23
23
  end
24
+
25
+ it "does not add backtrace identifier twice" do
26
+ length = ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS.length
27
+ class << Object.new
28
+ include ::RR::Adapters::Rspec
29
+ end
30
+ ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS.length.should == length
31
+ end
24
32
  end
@@ -1,6 +1,5 @@
1
1
  dir = File.dirname(__FILE__)
2
2
  require "examples/environment_fixture_setup"
3
- require "rr/adapters/test_unit"
4
3
 
5
4
  require "test/unit"
6
5
 
@@ -1,9 +1,13 @@
1
- patterns = ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS
2
- patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)
3
-
4
1
  module RR
5
2
  module Adapters
6
3
  module Rspec
4
+ def self.included(mod)
5
+ patterns = ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS
6
+ unless patterns.include?(RR::Errors::BACKTRACE_IDENTIFIER)
7
+ patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)
8
+ end
9
+ end
10
+
7
11
  include RR::Extensions::InstanceMethods
8
12
  def setup_mocks_for_rspec
9
13
  rr_reset
data/lib/rr.rb CHANGED
@@ -38,4 +38,7 @@ require "rr/times_called_matchers/proc_matcher"
38
38
  require "rr/times_called_matchers/at_least_matcher"
39
39
  require "rr/times_called_matchers/at_most_matcher"
40
40
 
41
- require "rr/extensions/instance_methods"
41
+ require "rr/extensions/instance_methods"
42
+
43
+ require "rr/adapters/rspec"
44
+ require "rr/adapters/test_unit"
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.3
3
3
  specification_version: 1
4
4
  name: rr
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
6
+ version: 0.3.1
7
7
  date: 2007-07-22 00:00:00 -07:00
8
8
  summary: RR (Double Ruby) is a double framework that features a rich selection of double techniques and a terse syntax. http://xunitpatterns.com/Test%20Double.html
9
9
  require_paths: