nutrasuite 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Nutrasuite
3
3
  ["a", "an", "and", "that", "the"].each do |article|
4
4
  eval <<-HERE
5
5
  def #{article}(name, &block)
6
- name = "#{article} #{name}"
6
+ name = "#{article} " << name
7
7
  Context.push(name, &block)
8
8
  end
9
9
  HERE
@@ -32,7 +32,12 @@ module Nutrasuite
32
32
  build_test(name, &block)
33
33
  end
34
34
 
35
- def build_test(name, &block)
35
+ # Defines a test based on the given context that will be skipped for now
36
+ def it_eventually(name, &block)
37
+ build_test(name, :skip => true, &block)
38
+ end
39
+
40
+ def build_test(name, options = {}, &block)
36
41
  test_name = Context.build_test_name(name)
37
42
 
38
43
  setups = []
@@ -42,10 +47,16 @@ module Nutrasuite
42
47
  teardowns.concat(context.teardowns)
43
48
  end
44
49
 
45
- define_method test_name do
46
- setups.each { |setup| setup.call }
47
- block.call
48
- teardowns.each { |teardown| teardown.call }
50
+ if options[:skip]
51
+ define_method test_name do
52
+ skip "not yet implemented"
53
+ end
54
+ else
55
+ define_method test_name do
56
+ setups.each { |setup| setup.call }
57
+ block.call
58
+ teardowns.each { |teardown| teardown.call }
59
+ end
49
60
  end
50
61
  end
51
62
 
@@ -1,3 +1,3 @@
1
1
  module Nutrasuite
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.1.1
4
+ version: 0.1.2
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-21 00:00:00.000000000 Z
13
+ date: 2012-02-24 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Nutrasuite is a low-calorie syntax sweetener for minitest
16
16
  email: