mutant 0.5.2 → 0.5.3

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: 372467c663ba37db41006f5d391002901cb81605
4
- data.tar.gz: ca5a1b4f3f7e47128bba0600d063fd8a9fe9e6be
3
+ metadata.gz: edacde6ada988b61110b578d2568903c5791c5bd
4
+ data.tar.gz: 66f1c39c340bade4fcc55b2b24cb838e787145d1
5
5
  SHA512:
6
- metadata.gz: 08d23296e94e826332f4b4e236c2bbc8bb8e0583752b5162c6bcdc70468f04d5a4a6d3fd5e8d62f21c1d13f574119dcec47b74746748d304da7b9c001ecf0d9f
7
- data.tar.gz: 23294458d3d827f542a7ca1b47c66755bd354acac1934b0279c5f761a22a3f3592bffe749588a2dc1ea417c190d811d9b20e8bea9c3a266dd5040180ca782fce
6
+ metadata.gz: 241299604cd937e1618f68d556544ddfc3580d7d52b9d263dc3aa0d1aa4d33de33fe7154392196c0685bbc9fd8e04143ba176ca3d73be95cdefee149b4b6a286
7
+ data.tar.gz: 1d4137de23eac2a0be3458dabe397f78c2b7c488e6531b52642324be3094f5076337baf4ee2c96300ef14bf774f33efdb66001008494f5674ddb7758ab20f898
data/.gitignore CHANGED
@@ -33,6 +33,7 @@ measurements
33
33
  ## BUNDLER
34
34
  .bundle
35
35
  Gemfile.lock
36
+ Gemfile.*.lock
36
37
 
37
38
  ## PROJECT::SPECIFIC
38
39
  /vendor
data/Changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.5.3 2014-03-05
2
+
3
+ Changes:
4
+
5
+ * mutant-rspec now supports rspec3 beta
6
+
1
7
  # v0.5.2 2014-03-04
2
8
 
3
9
  Changes:
data/config/flay.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  ---
2
2
  threshold: 18
3
- total_score: 811
3
+ total_score: 808
data/config/reek.yml CHANGED
@@ -136,4 +136,5 @@ UtilityFunction:
136
136
  - Mutant::Rspec::Strategy#configuration
137
137
  - Mutant::Rspec::Strategy#options
138
138
  - Mutant::Rspec::Strategy#world
139
+ - Mutant::Rspec::Strategy#rspec2
139
140
  max_helper_calls: 0
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # The current mutant version
5
- VERSION = '0.5.2'.freeze
5
+ VERSION = '0.5.3'.freeze
6
6
  end # Mutant
data/mutant-rspec.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.extra_rdoc_files = %w[TODO LICENSE]
19
19
 
20
20
  gem.add_runtime_dependency('mutant', "~> #{gem.version}")
21
- gem.add_runtime_dependency('rspec-core', '~> 2.14.1')
21
+ gem.add_runtime_dependency('rspec-core', '>= 2.14.1', '<= 3.0.0.beta2')
22
22
 
23
23
  gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')
24
24
  end
@@ -4,35 +4,53 @@ require 'spec_helper'
4
4
 
5
5
  describe Mutant, 'rspec integration' do
6
6
 
7
- around do |example|
8
- Dir.chdir(TestApp.root) do
9
- example.run
7
+ let(:base_cmd) { "bundle exec mutant -I lib --require test_app --use rspec" }
8
+
9
+ shared_examples_for 'rspec integration' do
10
+ around do |example|
11
+ Bundler.with_clean_env do
12
+ Dir.chdir(TestApp.root) do
13
+ Kernel.system("bundle install --gemfile=#{gemfile}")
14
+ ENV['BUNDLE_GEMFILE'] = gemfile
15
+ example.run
16
+ end
17
+ end
10
18
  end
11
- end
12
19
 
13
- let(:base_cmd) { 'bundle exec mutant -I lib --require test_app --use rspec' }
20
+ specify 'it allows to kill mutations' do
21
+ expect(Kernel.system("#{base_cmd} ::TestApp::Literal#string")).to be(true)
22
+ end
14
23
 
15
- specify 'it allows to kill mutations' do
16
- expect(Kernel.system("#{base_cmd} ::TestApp::Literal#string")).to be(true)
17
- end
24
+ specify 'it allows to exclude mutations' do
25
+ cli = <<-CMD.split("\n").join(' ')
26
+ #{base_cmd}
27
+ ::TestApp::Literal#string
28
+ ::TestApp::Literal#uncovered_string
29
+ --ignore-subject ::TestApp::Literal#uncovered_string
30
+ CMD
31
+ expect(Kernel.system(cli)).to be(true)
32
+ end
18
33
 
19
- specify 'it allows to exclude mutations' do
20
- cli = <<-CMD.split("\n").join(' ')
21
- #{base_cmd}
22
- ::TestApp::Literal#string
23
- ::TestApp::Literal#uncovered_string
24
- --ignore-subject ::TestApp::Literal#uncovered_string
25
- CMD
26
- expect(Kernel.system(cli)).to be(true)
34
+ specify 'fails to kill mutations when they are not covered' do
35
+ cli = "#{base_cmd} ::TestApp::Literal#uncovered_string"
36
+ expect(Kernel.system(cli)).to be(false)
37
+ end
38
+
39
+ specify 'fails when some mutations are not covered' do
40
+ cli = "#{base_cmd} ::TestApp::Literal"
41
+ expect(Kernel.system(cli)).to be(false)
42
+ end
27
43
  end
28
44
 
29
- specify 'fails to kill mutations when they are not covered' do
30
- cli = "#{base_cmd} ::TestApp::Literal#uncovered_string"
31
- expect(Kernel.system(cli)).to be(false)
45
+ context 'RSpec 2' do
46
+ let(:gemfile) { 'Gemfile.rspec2' }
47
+
48
+ it_behaves_like 'rspec integration'
32
49
  end
33
50
 
34
- specify 'fails when some mutations are not covered' do
35
- cli = "#{base_cmd} ::TestApp::Literal"
36
- expect(Kernel.system(cli)).to be(false)
51
+ context 'Rspec 3' do
52
+ let(:gemfile) { 'Gemfile.rspec3' }
53
+
54
+ it_behaves_like 'rspec integration'
37
55
  end
38
56
  end
@@ -13,9 +13,9 @@ end
13
13
  shared_examples_for 'a cli parser' do
14
14
  subject { cli.config }
15
15
 
16
- its(:strategy) { should eql(expected_strategy) }
17
- its(:reporter) { should eql(expected_reporter) }
18
- its(:matcher) { should eql(expected_matcher) }
16
+ it { expect(subject.strategy).to eql(expected_strategy) }
17
+ it { expect(subject.reporter).to eql(expected_reporter) }
18
+ it { expect(subject.matcher).to eql(expected_matcher) }
19
19
  end
20
20
 
21
21
  describe Mutant::CLI, '.new' do
@@ -42,7 +42,7 @@ describe Mutant::Rspec::Killer, '.new' do
42
42
  context 'when run exits zero' do
43
43
  let(:exit_status) { 0 }
44
44
 
45
- its(:killed?) { should be(false) }
45
+ it { expect(subject.killed?).to be(false) }
46
46
 
47
47
  it { should be_a(described_class) }
48
48
  end
@@ -50,7 +50,7 @@ describe Mutant::Rspec::Killer, '.new' do
50
50
  context 'when run exits nonzero' do
51
51
  let(:exit_status) { 1 }
52
52
 
53
- its(:killed?) { should be(true) }
53
+ it { expect(subject.killed?).to be(true) }
54
54
 
55
55
  it { should be_a(described_class) }
56
56
  end
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rspec', '~> 2.14.1'
4
+ gem 'mutant', path: '../'
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gem 'rspec', '~> 3.0.0.beta2'
3
+ gem 'mutant', path: '../'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -428,6 +428,8 @@ files:
428
428
  - spec/unit/mutant_spec.rb
429
429
  - test_app/.rspec
430
430
  - test_app/Gemfile.devtools
431
+ - test_app/Gemfile.rspec2
432
+ - test_app/Gemfile.rspec3
431
433
  - test_app/lib/test_app.rb
432
434
  - test_app/lib/test_app/literal.rb
433
435
  - test_app/spec/shared/command_method_behavior.rb