shared_should 0.6.3 → 0.6.4

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/README.md CHANGED
@@ -110,7 +110,6 @@ Some rules:
110
110
  * When <tt>use\_should</tt>, <tt>use\_context</tt> or <tt>use\_setup</tt> is invoked, it searches up the context hierarchy to find a matching shared definition.
111
111
  * You can redefine your shares by using the same name. These shares will only be available in in the current and descendant contexts.
112
112
  * Shares defined at the root (on your TestCase) are available in all contexts.
113
- * If you define a shared setup at the root level, you will need to call <tt>super</tt> if you have a setup instance method for your test.
114
113
 
115
114
  ### Initialization Block
116
115
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
data/lib/shared_should.rb CHANGED
@@ -42,7 +42,9 @@ class Test::Unit::TestCase
42
42
  return context_or_test_class.kind_of?(Shoulda::Context) ? context_or_test_class : Test::Unit::TestCase
43
43
  end
44
44
 
45
- def setup
45
+ alias_method :initialize_without_shared_setup_execute, :initialize
46
+ def initialize(test_name)
47
+ initialize_without_shared_setup_execute(test_name)
46
48
  (@@setup_blocks[self.class] || []).each do |setup_block|
47
49
  setup_block.bind(self).call
48
50
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shared_should}
8
- s.version = "0.6.3"
8
+ s.version = "0.6.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Pearce"]
@@ -1,9 +1,8 @@
1
1
  require 'helper'
2
2
 
3
3
  class TestSharedShould < Test::Unit::TestCase
4
- # check that setup instance method is executed
4
+ # check that setup instance method is executed when setup is overridden
5
5
  def setup
6
- super
7
6
  @setup_instance_method_executed = true
8
7
  end
9
8
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shared_should
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 3
10
- version: 0.6.3
9
+ - 4
10
+ version: 0.6.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Pearce