specify 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a168d4a8b7345ed5b16cd6c43da66c2363de56d
4
- data.tar.gz: 530ed45e4c88fd822a26f044ee568d93ab93a0a3
3
+ metadata.gz: c8a615b6750f109f2c81907de44b84077e95fd19
4
+ data.tar.gz: cb94cc50b679d13f318af27f05fbb77dfad598ed
5
5
  SHA512:
6
- metadata.gz: f48361f4930baad91b7f785bc8e72b29587b46471a723d9f5ba4013c111804f446f3c3c82a8d74f6788b9d7bcc9672298d721586930052aa9d6cd341743eb6ca
7
- data.tar.gz: e342c95bcb8702f9a3edec0325713f418a0522ab53402bb31003e99bf60f1d50a314c254d4dc60985ce38d45e2b8ddce4e4e9b882f37e8c0019db5f69e74ebee
6
+ metadata.gz: ef95d8db18426fcaf2fcf9e2b0bce3b2fabe9597c562a2d21fbeea3ae701053bc64e949e591c945b9a5652f4260be76060669fd23b8b43c59935ad5b5b945407
7
+ data.tar.gz: 78ae5f00744b5fcbd057368f9eb3f3693da59b038f0d03f211fadaff6ecbc5c76fd262d8279e8e7bb912c77f78e3ce5d4fa863c234490f57b15aa2ca149faef0
@@ -19,14 +19,22 @@ module RSpec
19
19
  end
20
20
 
21
21
  def example_step_passed(notification)
22
- full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}" unless notification.type.to_s == 'specify'
23
- full_message = "#{current_indentation} #{notification.message}" if notification.type.to_s == 'specify'
22
+ no_keyword_display = %w(specify example it)
23
+ keyword = notification.type.to_s
24
+
25
+ full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
26
+ full_message = "#{current_indentation} #{notification.message}" if no_keyword_display.include?(keyword)
27
+
24
28
  output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :success)
25
29
  end
26
30
 
27
31
  def example_step_failed(notification)
28
- full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message} (FAILED)" unless notification.type.to_s == 'specify'
29
- full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message} (FAILED)" if notification.type.to_s == 'specify'
32
+ no_keyword_display = %w(specify example it)
33
+ keyword = notification.type.to_s
34
+
35
+ full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message} (FAILED)" unless no_keyword_display.include?(keyword)
36
+ full_message = "#{current_indentation} #{notification.message} (FAILED)" if no_keyword_display.include?(keyword)
37
+
30
38
  output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :failure)
31
39
  end
32
40
 
@@ -48,6 +48,10 @@ module RSpec
48
48
  Action :specify, message, options, &block
49
49
  end
50
50
 
51
+ def example(message, options = {}, &block)
52
+ Action :example, message, options, &block
53
+ end
54
+
51
55
  private
52
56
 
53
57
  def Action(type, message, options = {}, &block)
@@ -1,3 +1,3 @@
1
1
  module Specify
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.0'
3
3
  end
data/spec/steps_spec.rb CHANGED
@@ -47,8 +47,13 @@ Feature' feature' do
47
47
  @specify = 'specify'
48
48
  end
49
49
 
50
+ example 'example' do
51
+ @example = 'example'
52
+ end
53
+
50
54
  expect(@it).to eq('it')
51
55
  expect(@specify).to eq('specify')
56
+ expect(@example).to eq('example')
52
57
  end
53
58
 
54
59
  Test 'test' do
@@ -65,6 +70,12 @@ Feature' feature' do
65
70
  expect(2 + 2).to eq 5
66
71
  end
67
72
  }.to raise_error
73
+
74
+ expect {
75
+ specify 'expectation alerts failure' do
76
+ expect(2 + 2).to eq 5
77
+ end
78
+ }.to raise_error
68
79
  end
69
80
  end
70
81
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Nyman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-09 00:00:00.000000000 Z
11
+ date: 2014-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -102,7 +102,7 @@ licenses:
102
102
  - MIT
103
103
  metadata: {}
104
104
  post_install_message: "\n(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n
105
- \ Specify 0.6.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
105
+ \ Specify 0.7.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
106
106
  (::) (::) (::)\n "
107
107
  rdoc_options: []
108
108
  require_paths: