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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58426f81c9b08008a5069dcc6f38c092538648d7
4
- data.tar.gz: e1df951a664043689eab832ddb4e30426abd525f
3
+ metadata.gz: 1561a62d24064fcf735df041efaea8c760bca479
4
+ data.tar.gz: b3a36f04627ca899b8b7d4c00f484633723e29f3
5
5
  SHA512:
6
- metadata.gz: 41b84bb06433efc42822febd2002a738be99ac197907f2de0998d1c211948d6e3cad02f3ea9ab5df018994cd6d800d4fe0b7926441d471d3c6898aa5b3a4df52
7
- data.tar.gz: 3e6f24e29c8815b1a4506dfd7f8e55974e21dce2095c5743c0068c9856a9dbcadfe6470424f06322523fa0d1310feed87e3af6f916d0c0bc1ca5d9f8ac6cd44d
6
+ metadata.gz: 4f3910cb156d11ad1f4d90792669b79692bdde2f64cbbfe39992db9c66eb6ce0488e72054554a66cf8f9e05e9650583545261cb919e0829767e92234bc1f9409
7
+ data.tar.gz: af05b93308ee310c6ab94b3f691d4ea7e6e1e2813d3bad68a625927a798fcd6d03a993e769164186e0ca6fc976c2ba9d6c85cd275e4555c1c6819ed60fbf7db1
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --require spec_helper
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Curacao
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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: