spectator 1.3.1 → 1.3.2

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: 8224d0dbd81297094686627e2c57a002ee6ebb10
4
- data.tar.gz: d03578fac43dec450fca0c13e9710ffc2e04fde8
3
+ metadata.gz: f76036a4e109005feb8d4e6d634c562a73b71e58
4
+ data.tar.gz: e1fb1af929bf3cf83347ca7a0fc30bfbf12ac19c
5
5
  SHA512:
6
- metadata.gz: ccc07eaab375e7ca4ed446a9780db3ab3b235d92ff220aa4f1ca9579199facdbd28e1bb074fe059412ae35240b4e7b8f1defd288ca32e0297ca4524762650b6a
7
- data.tar.gz: db74db3619284f9641f06241d7cc12408ea793d1899a8ee471aa6142af89bae64e8cb5f612477c4ef18dc56175bb6374153f5f10060bc69aa267a523e1d1b09c
6
+ metadata.gz: 8a122f32063d6bcc858824f57f626038d6932f01b81f9f6cb0a6363cb6cb6652365542aa16dd86c893161a22afbd07f48b3d86220deb3ff886b6702121592642
7
+ data.tar.gz: 2932484faefbdede1a8f3f63c044107669f70dc53d775a3799cbcfa087a0162892499e1a6ba95a78bf8dc3b00900327e65a025818f90f5f568a7a7c40e2bcbed
data/lib/spectator.rb CHANGED
@@ -54,7 +54,7 @@ module Spectator
54
54
  path_watcher.on_change { ui << :run_specs }
55
55
  path_watcher.watch_paths!
56
56
 
57
- ui.on(:run_all) { run_all_handler }
57
+ ui.on(:run_all) { run_all_handler }
58
58
  ui.on(:run_specs) { run_specs_handler }
59
59
  ui.on(:interrupt) { interrupt_handler }
60
60
 
@@ -64,11 +64,10 @@ module Spectator
64
64
 
65
65
  def run_all_handler
66
66
  return unless ui.can_run_specs?
67
-
68
67
  ui.status = :running_specs
69
68
  result = ui.run(spec_runner.command)
70
69
  success_notifier.notify(result)
71
- ui.status = nil if ui.status == :running_specs
70
+ ui.wait_for_changes
72
71
  end
73
72
 
74
73
  def run_specs_handler
@@ -1,3 +1,3 @@
1
1
  module Spectator
2
- VERSION = '1.3.1'
2
+ VERSION = '1.3.2'
3
3
  end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'spectator'
3
+ require 'spectator/specs_matcher'
4
+ require 'pathname'
5
+
6
+ describe Spectator::SpecsMatcher do
7
+ describe '#specs_for' do
8
+ let(:config) { OpenStruct.new(Spectator.default_config_hash) }
9
+ subject(:matcher) { described_class.new(config) }
10
+ let(:root) { Pathname(File.expand_path('../../../', __FILE__)) }
11
+
12
+ it 'matches specs too' do
13
+ spec_file = Pathname(__FILE__).expand_path.relative_path_from(root).to_s
14
+
15
+ expect(matcher.specs_for([spec_file])).to eq([spec_file])
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-02 00:00:00.000000000 Z
12
+ date: 2014-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: listen
@@ -120,6 +120,7 @@ files:
120
120
  - lib/spectator/ui.rb
121
121
  - lib/spectator/version.rb
122
122
  - spec/spec_helper.rb
123
+ - spec/spectator/specs_matcher_spec.rb
123
124
  - spec/spectator_spec.rb
124
125
  - spectator.gemspec
125
126
  homepage: ''
@@ -148,4 +149,5 @@ specification_version: 4
148
149
  summary: Watches specs for a Ruby or Rails project
149
150
  test_files:
150
151
  - spec/spec_helper.rb
152
+ - spec/spectator/specs_matcher_spec.rb
151
153
  - spec/spectator_spec.rb