fuci 0.3.0 → 0.4.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/fuci.rb +3 -2
- data/lib/fuci/cucumber.rb +27 -0
- data/lib/fuci/rspec.rb +1 -1
- data/lib/fuci/version.rb +1 -1
- data/spec/lib/fuci/cucumber_spec.rb +43 -0
- data/spec/lib/fuci/rspec_spec.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9748a1ca013640fd37c9ff289d150d92ed0d611f
|
4
|
+
data.tar.gz: 4c6c9d6b50f59caa6f5534d9f695dd35604403ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d0fee0fa88f9877e0c5ae0ada77ca3ffe10549e700d4e623a1c02ec9b0a9ef68d9123033785bd4f055b69576075987519383821aae56f8636328fca191342e2
|
7
|
+
data.tar.gz: 3cd3f94ee3bbe739a243498ff6381bf2a1d296f6e818d6f72cd3c70bddb3203cebf21e056f19e42fd9457857010a5e22a4666428716ac7656b38e13a27f736f4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/fuci.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
require 'fuci/runner'
|
2
1
|
require 'fuci/rspec'
|
2
|
+
require 'fuci/runner'
|
3
|
+
require 'fuci/cucumber'
|
3
4
|
require 'fuci/configurable'
|
4
5
|
|
5
6
|
module Fuci
|
6
7
|
include Configurable
|
7
8
|
|
8
|
-
DEFAULT_TESTERS = [Fuci::RSpec]
|
9
|
+
DEFAULT_TESTERS = [Fuci::RSpec, Fuci::Cucumber]
|
9
10
|
|
10
11
|
class << self
|
11
12
|
attr_accessor :server
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'fuci/tester'
|
2
|
+
|
3
|
+
module Fuci
|
4
|
+
class Cucumber < Tester
|
5
|
+
FAILURE_INDICATOR = 'Failing Scenarios:'
|
6
|
+
BASE_COMMAND = 'cucumber --color'
|
7
|
+
FAIL_FILE_CAPTURE = /cucumber (.*) #/
|
8
|
+
|
9
|
+
def indicates_failure? log
|
10
|
+
log.include? FAILURE_INDICATOR
|
11
|
+
end
|
12
|
+
|
13
|
+
def command log
|
14
|
+
@command ||= "#{base_command} #{failures log }"
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def base_command
|
20
|
+
BASE_COMMAND
|
21
|
+
end
|
22
|
+
|
23
|
+
def failures log
|
24
|
+
log.scan(FAIL_FILE_CAPTURE).join ' '
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/fuci/rspec.rb
CHANGED
data/lib/fuci/version.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
require_relative '../../../lib/fuci/cucumber'
|
3
|
+
|
4
|
+
describe Fuci::Cucumber do
|
5
|
+
before { @cucumber = Fuci::Cucumber.new }
|
6
|
+
|
7
|
+
describe 'composition' do
|
8
|
+
it 'inherits from Tester' do
|
9
|
+
expect(@cucumber).to_be_kind_of Fuci::Tester
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#indicates_failure?' do
|
14
|
+
describe "the log passed in includes 'Failing Scenarios:'" do
|
15
|
+
before { @log = 'jdivzxdfiweafFailing Scenarios:jeidxl' }
|
16
|
+
|
17
|
+
it 'returns true' do
|
18
|
+
expect(@cucumber.indicates_failure? @log ).to_equal true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "the log passed in doesn't include 'Failing Scenarios:'" do
|
23
|
+
before { @log = 'jdivzxdfiweafFailed Examples:jeidxl' }
|
24
|
+
|
25
|
+
it 'returns false' do
|
26
|
+
expect(@cucumber.indicates_failure? @log ).to_equal false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe '#command' do
|
32
|
+
it 'returns "cucumber <failure string>"' do
|
33
|
+
log = """
|
34
|
+
cucumber is #ljasdfois\ncucumber ok #jcicisj\ncucumber for #ie
|
35
|
+
iejfasdi\ncucumber testing #iiiirrpepwpqapc
|
36
|
+
"""
|
37
|
+
|
38
|
+
command = @cucumber.command log
|
39
|
+
|
40
|
+
expect(command).to_equal 'cucumber --color is ok for testing'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/spec/lib/fuci/rspec_spec.rb
CHANGED
@@ -29,7 +29,7 @@ describe Fuci::RSpec do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
describe '#command' do
|
32
|
-
it 'returns "rspec <failure string>"' do
|
32
|
+
it 'returns "rspec --tty <failure string>"' do
|
33
33
|
log = """
|
34
34
|
rspec is #ljasdfois\nrspec ok #jcicisj\nrspec for #ie
|
35
35
|
iejfasdi\nrspec testing #iiiirrpepwpqapc
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Jachimiak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest-spec-expect
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/fuci/cli_options.rb
|
87
87
|
- lib/fuci/command_cache.rb
|
88
88
|
- lib/fuci/configurable.rb
|
89
|
+
- lib/fuci/cucumber.rb
|
89
90
|
- lib/fuci/git.rb
|
90
91
|
- lib/fuci/rspec.rb
|
91
92
|
- lib/fuci/runner.rb
|
@@ -96,6 +97,7 @@ files:
|
|
96
97
|
- spec/lib/fuci/cli_options_spec.rb
|
97
98
|
- spec/lib/fuci/command_cache_spec.rb
|
98
99
|
- spec/lib/fuci/configurable_spec.rb
|
100
|
+
- spec/lib/fuci/cucumber_spec.rb
|
99
101
|
- spec/lib/fuci/git_spec.rb
|
100
102
|
- spec/lib/fuci/rspec_spec.rb
|
101
103
|
- spec/lib/fuci/runner_spec.rb
|
@@ -134,6 +136,7 @@ test_files:
|
|
134
136
|
- spec/lib/fuci/cli_options_spec.rb
|
135
137
|
- spec/lib/fuci/command_cache_spec.rb
|
136
138
|
- spec/lib/fuci/configurable_spec.rb
|
139
|
+
- spec/lib/fuci/cucumber_spec.rb
|
137
140
|
- spec/lib/fuci/git_spec.rb
|
138
141
|
- spec/lib/fuci/rspec_spec.rb
|
139
142
|
- spec/lib/fuci/runner_spec.rb
|
@@ -141,3 +144,4 @@ test_files:
|
|
141
144
|
- spec/lib/fuci/tester_spec.rb
|
142
145
|
- spec/lib/fuci_spec.rb
|
143
146
|
- spec/spec_helper.rb
|
147
|
+
has_rdoc:
|