specify 0.4.0 → 0.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69e28c76e85f675a58da7de545f6dabbbce8d096
4
- data.tar.gz: 18fe6a1eba5d7f22d547d1d4c7b714e0f01127f2
3
+ metadata.gz: 0024e122861fdbe3a31ea6b410c85aa1b73a5491
4
+ data.tar.gz: e9301f788cc95ab78344881695151990c999b2de
5
5
  SHA512:
6
- metadata.gz: c70699a694cc659c87a2084213da46efa23fc44c67fcd0d483a3e83a67d8053e744ccfd5865da9614cc9caef63f2438a140ad589fd3ee1bb5241bc5684a6ee8c
7
- data.tar.gz: 5397feaf56d969fa864111c8e0bcac12b988ff7e12bcaa8a18b63d025a4ddebafbea4845e2816b4ab5982c607e60d4585837d0fc7440549339e8c560d881f316
6
+ metadata.gz: 744c0ac39ac901fcde94a34afe286ea4bc00f33232a53f18110a724ffdba89d865b5d7cb87246d918dbd839d7d4123c4f661eb635e9f396b2ab458dc6fdeea67
7
+ data.tar.gz: 461e753360434699be5c91226e04fa673b593f7c59d7f83c307a10e3b916a570b4b958b85af524e2ee1b95bdc67c53d4802e8976bf495155022740e8d504549e
@@ -19,12 +19,14 @@ 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}"
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'
23
24
  output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :success)
24
25
  end
25
26
 
26
27
  def example_step_failed(notification)
27
- full_message = "#{current_indentation} #{notification.type.to_s.capitalize} #{notification.message} (FAILED)"
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'
28
30
  output.puts Core::Formatters::ConsoleCodes.wrap(full_message, :failure)
29
31
  end
30
32
 
@@ -52,10 +52,15 @@ module RSpec
52
52
  Action :it, message, options, &block
53
53
  end
54
54
 
55
+ def specify(message, options = {}, &block)
56
+ Action :specify, message, options, &block
57
+ end
58
+
55
59
  private
56
60
 
57
61
  def Action(type, message, options = {}, &block)
58
62
  ::RSpec.world.reporter.example_step_started(self, type, message, options)
63
+ options = {:pending => true} if options == :pending
59
64
 
60
65
  if block_given? && !options[:pending]
61
66
  begin
@@ -1,3 +1,3 @@
1
1
  module Specify
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
data/spec/steps_spec.rb CHANGED
@@ -31,6 +31,10 @@ Ability 'specify steps' do
31
31
  @it = 'It value'
32
32
  end
33
33
 
34
+ specify 'specify' do
35
+ @specify = 'Specify value'
36
+ end
37
+
34
38
  Test 'test' do
35
39
  @test = 'Test value'
36
40
  end
@@ -46,6 +50,7 @@ Ability 'specify steps' do
46
50
  expect(@but).to eq('But value')
47
51
  expect(@generic).to eq('Generic value')
48
52
  expect(@it).to eq('It value')
53
+ expect(@specify).to eq('Specify value')
49
54
  expect(@test).to eq('Test value')
50
55
  expect(@step).to eq('Step value')
51
56
  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.4.0
4
+ version: 0.5.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-10-26 00:00:00.000000000 Z
11
+ date: 2014-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,7 +99,7 @@ licenses:
99
99
  - MIT
100
100
  metadata: {}
101
101
  post_install_message: "\n(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n
102
- \ Specify 0.4.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
102
+ \ Specify 0.5.0 has been installed.\n\n(::) (::) (::) (::) (::) (::) (::) (::) (::)
103
103
  (::) (::) (::)\n "
104
104
  rdoc_options: []
105
105
  require_paths: