curacao 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/lib/curacao/matcher.rb +16 -0
- data/lib/curacao/matcher/have_content.rb +0 -15
- data/lib/curacao/matcher/produce_file.rb +22 -0
- data/lib/curacao/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1561a62d24064fcf735df041efaea8c760bca479
|
4
|
+
data.tar.gz: b3a36f04627ca899b8b7d4c00f484633723e29f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f3910cb156d11ad1f4d90792669b79692bdde2f64cbbfe39992db9c66eb6ce0488e72054554a66cf8f9e05e9650583545261cb919e0829767e92234bc1f9409
|
7
|
+
data.tar.gz: af05b93308ee310c6ab94b3f691d4ea7e6e1e2813d3bad68a625927a798fcd6d03a993e769164186e0ca6fc976c2ba9d6c85cd275e4555c1c6819ed60fbf7db1
|
data/.rspec
CHANGED
data/lib/curacao/matcher.rb
CHANGED
@@ -1 +1,17 @@
|
|
1
1
|
require 'curacao/matcher/have_content'
|
2
|
+
require 'curacao/matcher/produce_file'
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Use tmp/ to write files
|
6
|
+
$pwd = FileUtils.pwd
|
7
|
+
config.before(:each) do
|
8
|
+
tmp_path = File.join(File.dirname(__FILE__), '..', '..', 'tmp')
|
9
|
+
FileUtils.rm_rf tmp_path
|
10
|
+
FileUtils.mkdir_p tmp_path
|
11
|
+
FileUtils.cd tmp_path
|
12
|
+
end
|
13
|
+
|
14
|
+
config.after(:each) do
|
15
|
+
FileUtils.cd $pwd
|
16
|
+
end
|
17
|
+
end
|
@@ -1,17 +1,3 @@
|
|
1
|
-
RSpec.configure do |config|
|
2
|
-
# Use tmp/ to write files
|
3
|
-
$pwd = FileUtils.pwd
|
4
|
-
config.before(:each) do
|
5
|
-
FileUtils.rm_rf 'tmp'
|
6
|
-
FileUtils.mkdir_p 'tmp'
|
7
|
-
FileUtils.cd 'tmp'
|
8
|
-
end
|
9
|
-
|
10
|
-
config.after(:each) do
|
11
|
-
FileUtils.cd $pwd
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
1
|
RSpec::Matchers.define :have_content do |expected|
|
16
2
|
match do |actual|
|
17
3
|
actual = File.read actual
|
@@ -37,7 +23,6 @@ RSpec::Matchers.define :have_content do |expected|
|
|
37
23
|
'matches file content against expectation'
|
38
24
|
end
|
39
25
|
end
|
40
|
-
RSpec::Matchers.alias_matcher :with_content, :have_content
|
41
26
|
|
42
27
|
class String
|
43
28
|
def contentise
|
@@ -0,0 +1,22 @@
|
|
1
|
+
RSpec::Matchers.define :produce_file do |expected|
|
2
|
+
match do |actual|
|
3
|
+
actual.call
|
4
|
+
|
5
|
+
expect(File).to exist expected
|
6
|
+
end
|
7
|
+
|
8
|
+
supports_block_expectations
|
9
|
+
|
10
|
+
failure_message do |actual|
|
11
|
+
"expected file #{expected} to exist"
|
12
|
+
end
|
13
|
+
|
14
|
+
failure_message_when_negated do |actual|
|
15
|
+
"expected #{expected} to not exist"
|
16
|
+
end
|
17
|
+
|
18
|
+
description do
|
19
|
+
'check for existence of output file'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
RSpec::Matchers.alias_matcher :produce_the_file, :produce_file
|
data/lib/curacao/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curacao
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/curacao/matcher.rb
|
88
88
|
- lib/curacao/matcher/exit_with_status.rb
|
89
89
|
- lib/curacao/matcher/have_content.rb
|
90
|
+
- lib/curacao/matcher/produce_file.rb
|
90
91
|
- lib/curacao/version.rb
|
91
92
|
homepage: http://github.com
|
92
93
|
licenses:
|