specify 0.7.0 → 0.8.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: c8a615b6750f109f2c81907de44b84077e95fd19
4
- data.tar.gz: cb94cc50b679d13f318af27f05fbb77dfad598ed
3
+ metadata.gz: e58629e939ed681ae888123d14a2bdd72bfbd44a
4
+ data.tar.gz: 78f2bd0245507f970439284efee20cbba2631114
5
5
  SHA512:
6
- metadata.gz: ef95d8db18426fcaf2fcf9e2b0bce3b2fabe9597c562a2d21fbeea3ae701053bc64e949e591c945b9a5652f4260be76060669fd23b8b43c59935ad5b5b945407
7
- data.tar.gz: 78ae5f00744b5fcbd057368f9eb3f3693da59b038f0d03f211fadaff6ecbc5c76fd262d8279e8e7bb912c77f78e3ce5d4fa863c234490f57b15aa2ca149faef0
6
+ metadata.gz: 233afb80d963bf6cb4dfaeeba04ee0b52a77e0a49429098250a00c65d84098c233a01d1b0c42bacf487bf89203261a373d25ca8e65107a46f24adbcf58d6ccbd
7
+ data.tar.gz: ffb0902dfc6b52f0c26adec18e1e400bac2a321b72a34c4d0b56ad45bcc7d12760099f79e87a350aac2c9655edbcf3fb0d2c22d05f192b880d495222bae79c04
@@ -19,7 +19,7 @@ module RSpec
19
19
  end
20
20
 
21
21
  def example_step_passed(notification)
22
- no_keyword_display = %w(specify example it)
22
+ no_keyword_display = %w(specify example it rule)
23
23
  keyword = notification.type.to_s
24
24
 
25
25
  full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
@@ -29,7 +29,7 @@ module RSpec
29
29
  end
30
30
 
31
31
  def example_step_failed(notification)
32
- no_keyword_display = %w(specify example it)
32
+ no_keyword_display = %w(specify example it rule)
33
33
  keyword = notification.type.to_s
34
34
 
35
35
  full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message} (FAILED)" unless no_keyword_display.include?(keyword)
@@ -39,7 +39,12 @@ module RSpec
39
39
  end
40
40
 
41
41
  def example_step_pending(notification)
42
- full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}"
42
+ no_keyword_display = %w(specify example it rule)
43
+ keyword = notification.type.to_s
44
+ #full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message}"
45
+
46
+ full_message = "#{current_indentation} #{keyword.capitalize} #{notification.message}" unless no_keyword_display.include?(keyword)
47
+ full_message = "#{current_indentation} #{notification.message}" if no_keyword_display.include?(keyword)
43
48
 
44
49
  if notification.options[:pending] && notification.options[:pending] != true
45
50
  full_message << " (PENDING: #{notification.options[:pending]})"
@@ -36,10 +36,6 @@ module RSpec
36
36
  Action :but, message, options, &block
37
37
  end
38
38
 
39
- def _(message, options = {}, &block)
40
- Action :_, message, options, &block
41
- end
42
-
43
39
  def it(message, options = {}, &block)
44
40
  Action :it, message, options, &block
45
41
  end
@@ -52,6 +48,10 @@ module RSpec
52
48
  Action :example, message, options, &block
53
49
  end
54
50
 
51
+ def rule(message, options = {}, &block)
52
+ Action :rule, message, options, &block
53
+ end
54
+
55
55
  private
56
56
 
57
57
  def Action(type, message, options = {}, &block)
data/lib/specify/spec.rb CHANGED
@@ -8,7 +8,7 @@ module Specify
8
8
  alias :Feature :context
9
9
  alias :Ability :context
10
10
  alias :Story :context
11
- alias :Rule :context
11
+ alias :Component :context
12
12
  alias :rules :context
13
13
  alias :steps :context
14
14
  alias :tests :context
@@ -33,10 +33,6 @@ def self.Component(*args, &block)
33
33
  describe(*args, &block)
34
34
  end
35
35
 
36
- def self.Rule(*args, &block)
37
- describe(*args, &block)
38
- end
39
-
40
36
  def self.rules(*args, &block)
41
37
  describe(*args, &block)
42
38
  end
@@ -1,3 +1,3 @@
1
1
  module Specify
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
data/lib/specify.rb CHANGED
@@ -32,8 +32,10 @@ end
32
32
 
33
33
  RSpec::Core::ExampleGroup.define_example_method :Scenario, with_steps: true
34
34
  RSpec::Core::ExampleGroup.define_example_method :Condition, with_steps: true
35
+ RSpec::Core::ExampleGroup.define_example_method :Behavior, with_steps: true
35
36
  RSpec::Core::ExampleGroup.define_example_method :Step, with_steps: true
36
37
  RSpec::Core::ExampleGroup.define_example_method :Test, with_steps: true
38
+ RSpec::Core::ExampleGroup.define_example_method :Rule, with_steps: true
37
39
 
38
40
  require 'specify/rspec/shared_steps'
39
41
  include RSpec::Specify::SharedSteps
data/spec/nested_spec.rb CHANGED
@@ -21,19 +21,24 @@ end
21
21
  Story 'top-level story block' do
22
22
  Feature 'nested feature block' do
23
23
  Ability 'nested ability block' do
24
- Rule 'nested rule block' do
25
- Scenario 'nested scenario block' do
26
- specify 'specify some condition' do
27
- @result = 'gets a result'
28
- expect(@result).to eq('gets a result')
29
- end
24
+ Scenario 'nested scenario block' do
25
+ specify 'specify some condition' do
26
+ @result = 'gets a result'
27
+ expect(@result).to eq('gets a result')
30
28
  end
29
+ end
30
+
31
+ Condition 'nested condition block' do
32
+ specify 'specify some condition' do
33
+ @result = 'gets a result'
34
+ expect(@result).to eq('gets a result')
35
+ end
36
+ end
31
37
 
32
- Condition 'nested condition block' do
33
- specify 'specify some condition' do
34
- @result = 'gets a result'
35
- expect(@result).to eq('gets a result')
36
- end
38
+ Behavior 'nested behavior block' do
39
+ specify 'specify some condition' do
40
+ @result = 'gets a result'
41
+ expect(@result).to eq('gets a result')
37
42
  end
38
43
  end
39
44
  end
data/spec/steps_spec.rb CHANGED
@@ -38,6 +38,14 @@ Feature' feature' do
38
38
  expect(@but).to eq('but')
39
39
  end
40
40
 
41
+ Rule 'rule' do
42
+ rule 'rule' do
43
+ @rule = 'rule'
44
+ end
45
+
46
+ expect(@rule).to eq('rule')
47
+ end
48
+
41
49
  Step 'step' do
42
50
  it 'it' do
43
51
  @it = 'it'
@@ -56,21 +64,7 @@ Feature' feature' do
56
64
  expect(@example).to eq('example')
57
65
  end
58
66
 
59
- Test 'test' do
60
- _ 'generic' do
61
- @generic = 'generic'
62
- end
63
-
64
- expect(@generic).to eq('generic')
65
- end
66
-
67
67
  Condition 'failing steps' do
68
- expect {
69
- _ 'expectation alerts failure' do
70
- expect(2 + 2).to eq 5
71
- end
72
- }.to raise_error
73
-
74
68
  expect {
75
69
  specify 'expectation alerts failure' do
76
70
  expect(2 + 2).to eq 5
@@ -9,9 +9,6 @@ end
9
9
  Story 'top-level story block' do
10
10
  end
11
11
 
12
- Rule 'top-level rule block' do
13
- end
14
-
15
12
  Component 'top-level component block' do
16
13
  end
17
14
 
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.7.0
4
+ version: 0.8.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-23 00:00:00.000000000 Z
11
+ date: 2014-11-26 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.7.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
105
+ \ Specify 0.8.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
106
106
  (::) (::) (::)\n "
107
107
  rdoc_options: []
108
108
  require_paths: