aruba-rspec 1.0.0 → 1.0.1

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: 9a0d94479c0a0ca2360d8a8b88bc79a0565bfbd6
4
- data.tar.gz: f79600176acebd987effdb562ffe405bf3a44ec2
3
+ metadata.gz: fb22f810601d4864d1c83ff1d8230855e681ff22
4
+ data.tar.gz: 985b41b67f6b1c57f29e515b1a8c162234ad884a
5
5
  SHA512:
6
- metadata.gz: f8b95079a7209547ac4ef5b6257a827627a38a4643680f2daa1dffc7c20a9e5823c32b55f6d06ae12a740a032748be6cc43ac105f299461ef3b229eba96f8cc6
7
- data.tar.gz: e7847b913f87d5e287f1fe7c86f857e4cd7842c4d2d1417b9c3629fe7e113c92bac43c0ed316c01f1fc59d81262f538d1e917169dcf8a93b4412781a615605d8
6
+ metadata.gz: 0a9b45bb6ef47f4b6c95f81834c00890da30b529c4ce90890d243b1929a8040f31b2c0158ef41b41589c470fdd94e6d444c4440ee12bdccaae99a7117d9c83a1
7
+ data.tar.gz: f399628ee25684852e042ecaf5fe2a302fbe2e963f95fda1a0eb8ac492e8d61f48c75c769b621886f6370aa906e103e83c72259c41eed8869fcb6765bdb7c42b
@@ -2,7 +2,8 @@ RSpec::Matchers.define :have_exit_status do |status|
2
2
  match do |ruby|
3
3
  raise ArgumentError, "expected should be a Proc" unless ruby.respond_to?(:call)
4
4
  ruby.call
5
- $?.exitstatus == status
5
+ @ruby_exit_status = $?.exitstatus
6
+ @ruby_exit_status == status
6
7
  end
7
8
 
8
9
  def supports_block_expectations?
@@ -10,7 +11,7 @@ RSpec::Matchers.define :have_exit_status do |status|
10
11
  end
11
12
 
12
13
  failure_message do |ruby|
13
- "expected that code would exit #{status}"
14
+ "expected that code would exit #{status}, instead exited #{@ruby_exit_status}"
14
15
  end
15
16
 
16
17
  failure_message_when_negated do |ruby|
@@ -1,5 +1,5 @@
1
1
  module Aruba
2
2
  module RSpec
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
@@ -24,7 +24,7 @@ describe 'have_exit_status matcher' do
24
24
  double_cmd('thing', exit: 101)
25
25
  expect {
26
26
  expect { `thing` }.to have_exit_status(100)
27
- }.to raise_error(RSpec::Expectations::ExpectationNotMetError, /expected that code would exit 100/)
27
+ }.to raise_error(RSpec::Expectations::ExpectationNotMetError, /expected that code would exit 100, instead exited 101/)
28
28
  end
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aruba-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Saxby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-04 00:00:00.000000000 Z
11
+ date: 2014-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec