mini_shoulda 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,5 +2,5 @@
2
2
  source :rubygems
3
3
 
4
4
  gem 'rake'
5
- gem 'minitest', '~> 2.0.2'
5
+ gem 'minitest', '~> 2.1.0'
6
6
 
@@ -1,5 +1,4 @@
1
1
  require 'minitest/spec'
2
- require 'mini_shoulda/minitest_describe_patch'
3
2
  require 'mini_shoulda/spec'
4
3
 
5
4
  # = MiniShoulda
@@ -1,3 +1,3 @@
1
1
  module MiniShoulda
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -15,5 +15,5 @@ Gem::Specification.new do |s|
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ['lib']
18
- s.add_dependency('minitest', '~> 2.0.2')
18
+ s.add_dependency('minitest', '~> 2.1.0')
19
19
  end
@@ -1,8 +1,5 @@
1
1
  require 'test_helper'
2
2
 
3
- # TODO: This test should disappear when we no longer have to patch MiniTest's
4
- # Kernel#describe block using our 'mini_shoulda/minitest_describe_patch' file.
5
-
6
3
  class ScopeTest < MiniShoulda::SpecCase
7
4
 
8
5
  should 'use base instance helpers' do
@@ -29,3 +26,16 @@ class ScopeTest < MiniShoulda::SpecCase
29
26
 
30
27
 
31
28
  end
29
+
30
+ class DuppedScopeTest < MiniTest::Spec
31
+
32
+ context('Context A') { }
33
+
34
+ context('Context B') { }
35
+
36
+ should 'only show this failure once' do
37
+ flunk "Passed if you only see this once!!!\n" +
38
+ "test_0001_only_show_this_failure_once(DuppedScopeTest)"
39
+ end
40
+
41
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mini_shoulda
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ken Collins
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-25 00:00:00 -04:00
13
+ date: 2011-04-13 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ~>
23
23
  - !ruby/object:Gem::Version
24
- version: 2.0.2
24
+ version: 2.1.0
25
25
  type: :runtime
26
26
  version_requirements: *id001
27
27
  description: MiniShoulda - A minimal shoulda DSL built on top of MiniTest::Spec.
@@ -41,7 +41,6 @@ files:
41
41
  - README.rdoc
42
42
  - Rakefile
43
43
  - lib/mini_shoulda.rb
44
- - lib/mini_shoulda/minitest_describe_patch.rb
45
44
  - lib/mini_shoulda/spec.rb
46
45
  - lib/mini_shoulda/version.rb
47
46
  - mini_shoulda.gemspec
@@ -1,21 +0,0 @@
1
- # I currently have a patch submitted to minitest to allow parent classes to maintain their
2
- # inhertance chain when describe blocks are used. Please help me get it into core!
3
- # https://github.com/seattlerb/minitest/pull/9
4
-
5
- module Kernel
6
-
7
- def describe desc, &block
8
- stack = MiniTest::Spec.describe_stack
9
- name = [stack.last, desc].compact.join("::")
10
- sclas = stack.last || (self.is_a?(Class) && self < MiniTest::Spec ? self : MiniTest::Spec)
11
- cls = Class.new(sclas)
12
- (class << cls; self; end).send(:define_method, :to_s) { name }
13
- cls.nuke_test_methods!
14
- stack.push cls
15
- cls.class_eval(&block)
16
- stack.pop
17
- cls
18
- end
19
-
20
- end
21
-