rr 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rr/space.rb CHANGED
@@ -40,12 +40,17 @@ module RR
40
40
  end
41
41
 
42
42
  # Creates and registers a Scenario to be verified.
43
- def scenario(double)
44
- scenario = Scenario.new(self, double)
43
+ def scenario(double, definition = scenario_definition)
44
+ scenario = Scenario.new(self, double, definition)
45
+ scenario.definition.scenario = scenario
45
46
  double.register_scenario scenario
46
47
  scenario
47
48
  end
48
49
 
50
+ def scenario_definition
51
+ ScenarioDefinition.new(self)
52
+ end
53
+
49
54
  # Reuses or creates, if none exists, a Double for the passed
50
55
  # in object and method_name.
51
56
  # When a Double is created, it binds the dispatcher to the
metadata CHANGED
@@ -3,8 +3,8 @@ 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.3
7
- date: 2007-07-22 00:00:00 -07:00
6
+ version: 0.3.4
7
+ date: 2007-07-25 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:
10
10
  - lib
@@ -35,7 +35,9 @@ files:
35
35
  - lib/rr.rb
36
36
  - lib/rr/scenario_method_proxy.rb
37
37
  - lib/rr/scenario.rb
38
+ - lib/rr/scenario_definition.rb
38
39
  - lib/rr/hash_with_object_id_key.rb
40
+ - lib/rr/scenario_definition_builder.rb
39
41
  - lib/rr/scenario_matches.rb
40
42
  - lib/rr/space.rb
41
43
  - lib/rr/double.rb
@@ -74,6 +76,7 @@ files:
74
76
  - examples/example_helper.rb
75
77
  - examples/test_unit_example_suite.rb
76
78
  - examples/high_level_example.rb
79
+ - examples/rr/scenario_definition_example.rb
77
80
  - examples/rr/scenario_method_proxy_example.rb
78
81
  - examples/rr/scenario_example.rb
79
82
  - examples/rr/scenario_creator_example.rb