coulda 0.4.5 → 0.4.6

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/HISTORY CHANGED
@@ -56,3 +56,8 @@ Cleanup
56
56
  0.4.5
57
57
  -----
58
58
  - No longer requires rubygems for Ruby 1.9.1
59
+
60
+ 0.4.6
61
+ -----
62
+ - Fixed issue where Scenario implementations were not delegating unresolved method calls to the wrapped test. Should allow for usage of tools such as Webrat
63
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.5
1
+ 0.4.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{coulda}
8
- s.version = "0.4.5"
8
+ s.version = "0.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Evan David Light"]
12
- s.date = %q{2009-11-26}
12
+ s.date = %q{2009-11-30}
13
13
  s.description = %q{Behaviour Driven Development derived from Cucumber but as an internal DSL with methods for reuse}
14
14
  s.email = %q{evan@tiggerpalace.com}
15
15
  s.extra_rdoc_files = [
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
45
45
  "test/scenario_test.rb",
46
46
  "test/test_helper.rb"
47
47
  ]
48
- s.homepage = %q{http://evan.tiggerpalace.com/}
48
+ s.homepage = %q{http://coulda.tiggerpalace.com/}
49
49
  s.rdoc_options = ["--charset=UTF-8"]
50
50
  s.require_paths = ["lib"]
51
51
  s.rubygems_version = %q{1.3.5}
@@ -7,7 +7,7 @@ module Coulda
7
7
  include Test::Unit::Assertions
8
8
 
9
9
  attr_reader :scenarios, :name
10
- attr_accessor :current_scenario
10
+ attr_accessor :current_scenario, :test_instance
11
11
 
12
12
  def initialize(name, opts = {})
13
13
  World.register_feature(self)
@@ -54,5 +54,11 @@ module Coulda
54
54
  raise SyntaxError.new("Must have all or none of in_order, as_a, and i_want_to called in a Feature")
55
55
  end
56
56
  end
57
+
58
+ def method_missing(name, *args)
59
+ if test_instance
60
+ test_instance.__send__(name, *args)
61
+ end
62
+ end
57
63
  end
58
64
  end
@@ -44,7 +44,13 @@ module Coulda
44
44
  def create_and_provision_test_method_for(feature, &block)
45
45
  execute block, :within => feature
46
46
  inject_test_steps_into @test_class
47
- define_test_method_using { self.class.test_steps.each { |s| feature.instance_eval &s } }
47
+ define_test_method_using do
48
+ feature.test_instance = self
49
+ self.class.test_steps.each do |s|
50
+ feature.instance_eval &s
51
+ end
52
+ feature.test_instance = nil
53
+ end
48
54
  end
49
55
 
50
56
  def assign_test_class_to_const(my_feature)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coulda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan David Light
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-26 00:00:00 -05:00
12
+ date: 2009-11-30 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -60,7 +60,7 @@ files:
60
60
  - test/scenario_test.rb
61
61
  - test/test_helper.rb
62
62
  has_rdoc: true
63
- homepage: http://evan.tiggerpalace.com/
63
+ homepage: http://coulda.tiggerpalace.com/
64
64
  licenses: []
65
65
 
66
66
  post_install_message: