rr 0.3.0 → 0.3.1
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/CHANGES +3 -0
- data/Rakefile +1 -1
- data/examples/example_helper.rb +0 -1
- data/examples/rr/rspec/rspec_backtrace_tweaking_example.rb +8 -0
- data/examples/rr/test_unit/test_helper.rb +0 -1
- data/lib/rr/adapters/rspec.rb +7 -3
- data/lib/rr.rb +4 -1
- metadata +1 -1
data/CHANGES
CHANGED
data/Rakefile
CHANGED
data/examples/example_helper.rb
CHANGED
@@ -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
|
data/lib/rr/adapters/rspec.rb
CHANGED
@@ -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.
|
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:
|