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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5ba244bcdcab4ce2878400e677ac26b989f7900
4
- data.tar.gz: 1b12e99347df18f93d5cee35a8440e17c59d4586
3
+ metadata.gz: 9748a1ca013640fd37c9ff289d150d92ed0d611f
4
+ data.tar.gz: 4c6c9d6b50f59caa6f5534d9f695dd35604403ae
5
5
  SHA512:
6
- metadata.gz: bf6727e01bf54307aea86683af8faaf1ad9ca6d454f441c859777c56e18839e7659dd627d68ec9ce52ccce84ae40dc43a59964f52840bfeb9ba056d9c7ed3a76
7
- data.tar.gz: e3e318715eca38d250c7c98d4f86efb5b459cf730ec03bf4dc282965d18f5dad8d9c4b4c54eef3f4b6f855b2489012f220a068266160ebf475d25bfcd0f6668b
6
+ metadata.gz: 1d0fee0fa88f9877e0c5ae0ada77ca3ffe10549e700d4e623a1c02ec9b0a9ef68d9123033785bd4f055b69576075987519383821aae56f8636328fca191342e2
7
+ data.tar.gz: 3cd3f94ee3bbe739a243498ff6381bf2a1d296f6e818d6f72cd3c70bddb3203cebf21e056f19e42fd9457857010a5e22a4666428716ac7656b38e13a27f736f4
@@ -1,3 +1,6 @@
1
+ ### version 0.4.0 *August 10, 2013*
2
+ * Adds Fuci::Cucumber as native tester plugin
3
+
1
4
  ### version 0.3.0 *August 5, 2013*
2
5
  * Adds three methods to Git helper:
3
6
  1. `#remote_sha_from(branch_name)`
data/README.md CHANGED
@@ -10,7 +10,7 @@ Add this line to your fuci extension's Gemspec:
10
10
  ```ruby
11
11
  Gem::Specification.new do |spec|
12
12
  ...
13
- spec.add_dependency 'fuci', '~> 0.2'
13
+ spec.add_dependency 'fuci', '~> 0.3'
14
14
  ...
15
15
  end
16
16
  ```
@@ -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
@@ -1,7 +1,7 @@
1
1
  require 'fuci/tester'
2
2
 
3
3
  module Fuci
4
- class RSpec < Fuci::Tester
4
+ class RSpec < Tester
5
5
  FAILURE_INDICATOR = 'Failed examples:'
6
6
  BASE_COMMAND = 'rspec --tty'
7
7
  FAIL_FILE_CAPTURE = /rspec (.*) #/
@@ -1,3 +1,3 @@
1
1
  module Fuci
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -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
@@ -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.3.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-05 00:00:00.000000000 Z
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: