aruba-rspec 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/aruba-rspec.gemspec +1 -1
- data/lib/aruba/rspec/matchers/have_exit_status.rb +6 -2
- data/lib/aruba/rspec/matchers/shellout.rb +6 -2
- data/lib/aruba/rspec/version.rb +1 -1
- data/spec/aruba/rspec_spec.rb +5 -3
- data/spec/spec_helper.rb +0 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a0d94479c0a0ca2360d8a8b88bc79a0565bfbd6
|
4
|
+
data.tar.gz: f79600176acebd987effdb562ffe405bf3a44ec2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8b95079a7209547ac4ef5b6257a827627a38a4643680f2daa1dffc7c20a9e5823c32b55f6d06ae12a740a032748be6cc43ac105f299461ef3b229eba96f8cc6
|
7
|
+
data.tar.gz: e7847b913f87d5e287f1fe7c86f857e4cd7842c4d2d1417b9c3629fe7e113c92bac43c0ed316c01f1fc59d81262f538d1e917169dcf8a93b4412781a615605d8
|
data/aruba-rspec.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'rspec'
|
21
|
+
spec.add_dependency 'rspec', '>= 3.0'
|
22
22
|
spec.add_dependency 'aruba'
|
23
23
|
spec.add_dependency 'aruba-doubles'
|
24
24
|
spec.add_development_dependency "bundler"
|
@@ -5,11 +5,15 @@ RSpec::Matchers.define :have_exit_status do |status|
|
|
5
5
|
$?.exitstatus == status
|
6
6
|
end
|
7
7
|
|
8
|
-
|
8
|
+
def supports_block_expectations?
|
9
|
+
true
|
10
|
+
end
|
11
|
+
|
12
|
+
failure_message do |ruby|
|
9
13
|
"expected that code would exit #{status}"
|
10
14
|
end
|
11
15
|
|
12
|
-
|
16
|
+
failure_message_when_negated do |ruby|
|
13
17
|
"expected that code would NOT exit #{status}"
|
14
18
|
end
|
15
19
|
|
@@ -5,11 +5,15 @@ RSpec::Matchers.define :shellout do |cmd|
|
|
5
5
|
Aruba::RSpec.history.include?(cmd.shellsplit)
|
6
6
|
end
|
7
7
|
|
8
|
-
|
8
|
+
def supports_block_expectations?
|
9
|
+
true
|
10
|
+
end
|
11
|
+
|
12
|
+
failure_message do |ruby|
|
9
13
|
"expected that code would run command #{cmd}\nfound: #{Aruba::RSpec.history.map(&:shelljoin)}"
|
10
14
|
end
|
11
15
|
|
12
|
-
|
16
|
+
failure_message_when_negated do |ruby|
|
13
17
|
"expected that code would NOT run command #{cmd}"
|
14
18
|
end
|
15
19
|
|
data/lib/aruba/rspec/version.rb
CHANGED
data/spec/aruba/rspec_spec.rb
CHANGED
@@ -9,14 +9,16 @@ describe Aruba::RSpec do
|
|
9
9
|
|
10
10
|
describe '::setup' do
|
11
11
|
it 'sets up ArubaDoubles' do
|
12
|
-
ArubaDoubles::Double.
|
12
|
+
allow(ArubaDoubles::Double).to receive(:setup)
|
13
13
|
Aruba::RSpec.setup
|
14
14
|
expect(ArubaDoubles::Double).to have_received(:setup)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
describe '::teardown' do
|
19
|
-
before
|
19
|
+
before do
|
20
|
+
allow(ArubaDoubles::Double).to receive(:teardown)
|
21
|
+
end
|
20
22
|
|
21
23
|
it 'tears down ArubaDoubles' do
|
22
24
|
Aruba::RSpec.teardown
|
@@ -24,7 +26,7 @@ describe Aruba::RSpec do
|
|
24
26
|
end
|
25
27
|
|
26
28
|
it 'clears the history' do
|
27
|
-
Aruba::RSpec.history.
|
29
|
+
allow(Aruba::RSpec.history).to receive(:clear)
|
28
30
|
Aruba::RSpec.teardown
|
29
31
|
expect(Aruba::RSpec.history).to have_received(:clear)
|
30
32
|
end
|
data/spec/spec_helper.rb
CHANGED
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: 0.0
|
4
|
+
version: 1.0.0
|
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-
|
11
|
+
date: 2014-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aruba
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|