nutrasuite 0.2.0 → 0.2.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.
@@ -53,9 +53,10 @@ module Nutrasuite
53
53
  end
54
54
  else
55
55
  define_method test_name do
56
- setups.each { |setup| setup.call }
57
- block.call
58
- teardowns.each { |teardown| teardown.call }
56
+ test = MiniTest::Unit::TestCase.current
57
+ setups.each { |setup| test.instance_eval &setup }
58
+ test.instance_eval &block
59
+ teardowns.each { |teardown| test.instance_eval &teardown }
59
60
  end
60
61
  end
61
62
  end
@@ -64,14 +65,6 @@ module Nutrasuite
64
65
  puts " * Warning: #{message}"
65
66
  end
66
67
 
67
- # ugly, but we need to make sure that all assertions work as intended
68
- def method_missing(name, *args, &block)
69
- unless MiniTest::Unit::TestCase.current.nil?
70
- MiniTest::Unit::TestCase.current.send(name, *args, &block)
71
- else
72
- super(name, *args, &block)
73
- end
74
- end
75
68
  end
76
69
 
77
70
  class Context
@@ -1,3 +1,3 @@
1
1
  module Nutrasuite
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -1,7 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class ContextsTest < Test::Unit::TestCase
4
- binding.pry
5
4
 
6
5
  it "allows tests outside of any context" do
7
6
  assert true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutrasuite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-25 00:00:00.000000000 Z
13
+ date: 2012-02-26 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Nutrasuite is a low-calorie syntax sweetener for minitest
16
16
  email: