autotest-standalone 4.5.10 → 4.5.11

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source :rubygems
3
3
  group :dev do
4
4
  gem 'rake'
5
5
  gem 'shoulda'
6
+ gem 'mocha'
6
7
  gem 'rspec', '~>2'
7
8
  gem 'jeweler'
8
9
  gem 'parallel_tests'
@@ -7,6 +7,9 @@ GEM
7
7
  bundler (~> 1.0)
8
8
  git (>= 1.2.5)
9
9
  rake
10
+ metaclass (0.0.1)
11
+ mocha (0.13.0)
12
+ metaclass (~> 0.0.1)
10
13
  parallel (0.5.11)
11
14
  parallel_tests (0.6.11)
12
15
  parallel
@@ -26,6 +29,7 @@ PLATFORMS
26
29
 
27
30
  DEPENDENCIES
28
31
  jeweler
32
+ mocha
29
33
  parallel_tests
30
34
  rake
31
35
  rspec (~> 2)
data/Readme.md CHANGED
@@ -65,6 +65,7 @@ License
65
65
  =======
66
66
 
67
67
  ### Autotest was extracted from ZenTest and improved by:
68
+ - [Sam Pierson](https://github.com/sampierson)
68
69
  - [brian p o'rourke](https://github.com/bpo)
69
70
  - [Charles Roper](http://twitter.com/charlesroper)
70
71
  - [Shane Liebling](http://github.com/shanel)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.5.10
1
+ 4.5.11
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "autotest-standalone"
8
- s.version = "4.5.10"
8
+ s.version = "4.5.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Davis", "Michael Grosser"]
12
- s.date = "2012-10-16"
12
+ s.date = "2012-11-14"
13
13
  s.executables = ["autotest", "unit_diff"]
14
14
  s.files = [
15
15
  ".autotest",
@@ -125,7 +125,7 @@ class Autotest
125
125
 
126
126
  opts.on("-s", "--style STYLE", String,
127
127
  "Manually specify test style. (default: autodiscover)") do |style|
128
- options[:style] = Array(style)
128
+ options[:style] = style.split(/\s/)
129
129
  end
130
130
 
131
131
  opts.on("-p", "--parallel","Run tests (Test::Unit only) in parallel -- gem install parallel_tests") do
@@ -1,9 +1,10 @@
1
1
  require File.expand_path('test/helper')
2
2
  require 'autotest'
3
-
3
+ require 'mocha/setup'
4
4
 
5
5
  # NOT TESTED:
6
6
  # class_run
7
+ # discover
7
8
  # add_sigint_handler
8
9
  # all_good
9
10
  # get_to_green
@@ -453,11 +454,34 @@ test_error2(#{@test_class}):
453
454
  assert_equal expect, actual
454
455
  end
455
456
 
457
+ def test_runner_with_single_word_style
458
+ Autotest.stubs :options => {:style => ['rspec2']}
459
+ Autotest.stubs :puts
460
+ Autotest.expects(:require).with('autotest/rspec2')
461
+ Autotest.expects(:const_get).with('Rspec2')
462
+
463
+ Autotest.runner
464
+ end
465
+
466
+ def test_runner_with_multi_word_style
467
+ Autotest.stubs :options => {:style => ['rails', 'rspec2']}
468
+ Autotest.stubs :puts
469
+ Autotest.expects(:require).with('autotest/rails_rspec2')
470
+ Autotest.expects(:const_get).with('RailsRspec2')
471
+
472
+ Autotest.runner
473
+ end
474
+
456
475
  def test_sleep_option
457
476
  result = Autotest.parse_options(['--delay','0'])
458
477
  assert_equal({:delay => 0}, result)
459
478
  end
460
479
 
480
+ def test_style_options
481
+ assert_equal Autotest.parse_options(['--style', 'rspec2']), {:style => ['rspec2']}
482
+ assert_equal Autotest.parse_options(['--style', 'rspec2 rails']), {:style => ['rspec2', 'rails']}
483
+ end
484
+
461
485
  def test_no_options
462
486
  result = Autotest.parse_options([])
463
487
  assert_equal({}, result)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autotest-standalone
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.10
4
+ version: 4.5.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-16 00:00:00.000000000 Z
13
+ date: 2012-11-14 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description:
16
16
  email:
@@ -59,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
59
  version: '0'
60
60
  segments:
61
61
  - 0
62
- hash: -2388941284239321268
62
+ hash: -191681649076713839
63
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements: