bdd 0.0.3 → 0.0.4

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: 7b3071c8c5074b6bca6bdd82ba09c81b9db354e5
4
- data.tar.gz: 45901f145dd5e74fa4afed0dd81e921211068b59
3
+ metadata.gz: cbc92a0c8782e9974981c74890dea36d220410c3
4
+ data.tar.gz: 024305cd3b3cacc85e01d3640410aa2144281786
5
5
  SHA512:
6
- metadata.gz: f75dff103d304b7113f40aee32b9ed767e5665ea1f729a6bea763a5122566e865098f357fc0dd95a7472fec66fb74bffcc25b65c82238782367ce58bcc0425f1
7
- data.tar.gz: 472fdb4a93f13e82a6c3f7ee396f091f180f6c8ac590027232406d8cd453ad9fddef2cba6fadd442692506fbc919460e0ee76970aef44dde496235367b8ffe20
6
+ metadata.gz: 1d6f5ebc9288be3d2e31bc8fc54903dd33617d3ccbe868491e1215ddbd257e49dc22517864b213edbcea93ec813683254a757a555f45af5f83e4f5bc3dc01a01
7
+ data.tar.gz: 792d9fd642291bdc205b7649fdfe224391c28195c04c830dc1fd97dd91d4896fdb358801d239261436a30e1fc5b58bd43401a5bb1b2319898d05db5ef4c206d6
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format Bdd::RSpec::Formatter
2
+ --color
@@ -38,11 +38,11 @@ module Bdd
38
38
  msg0 = if msg[0] == last_step_title
39
39
  blank_step_title
40
40
  else
41
- msg[0].light_white.bold
41
+ text_with_color(msg[0], :white)
42
42
  end
43
43
  last_step_title = msg[0]
44
44
 
45
- msg = [msg0, msg[1].colorize(color)].join(' ')
45
+ msg = [msg0, text_with_color(msg[1], color)].join(' ')
46
46
  end
47
47
  # light_black doesn't really get used because the test failure prevents other messages from being added
48
48
  r = [next_indentation, msg]
@@ -58,6 +58,16 @@ module Bdd
58
58
  ' ' * (@group_level+1)
59
59
  end
60
60
 
61
+ private
62
+
63
+ def text_with_color(text, color)
64
+ if ::RSpec.configuration.color_enabled?
65
+ text.colorize(color)
66
+ else
67
+ text
68
+ end
69
+ end
70
+
61
71
  end
62
72
  end
63
73
  end
data/lib/bdd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bdd
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/bdd.rb CHANGED
@@ -1,12 +1,13 @@
1
1
  require "bdd/version"
2
+ require "rspec/core"
2
3
 
3
4
  require "colorize"
4
5
 
5
6
 
6
7
 
7
- require "bdd/rspec" if defined? RSpec
8
- # TODO: require "bdd/test_unit" # if
9
- # TODO: require "bdd/minitest" # if
8
+ require "bdd/rspec"
9
+ # TODO: require "bdd/test_unit" # if
10
+ # TODO: require "bdd/minitest" # if
10
11
 
11
12
 
12
13
  module Bdd
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pinto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".gitignore"
49
+ - ".rspec"
49
50
  - ".travis.yml"
50
51
  - CHANGELOG.md
51
52
  - Gemfile
@@ -78,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
79
  version: '0'
79
80
  requirements: []
80
81
  rubyforge_project:
81
- rubygems_version: 2.4.5
82
+ rubygems_version: 2.4.8
82
83
  signing_key:
83
84
  specification_version: 4
84
85
  summary: Cucumber style in your RSpec tests