catch_and_release 0.0.0 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efb4dd3fceb906aa83a238321421997500b68020
|
4
|
+
data.tar.gz: a19165d432b874007acef707011b368392c53163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92c77c670382a69e55ed3ccba6e94ff601764a52b071fb35a958c00a58abb98a8ede9283e6ac0be0ca5e52a561333f45ad9ce3ee2d29e11b662f54f97976aa46
|
7
|
+
data.tar.gz: 3e277646acc8e06daa558a335aca601325590f40b92e20dc710662c19d8e496b2e6bcd66e44c68db1b2038830e8f524df4c3028a2964c89dbad9169a6214adcb
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module CatchAndRelease
|
2
|
+
module RSpec
|
3
|
+
|
4
|
+
Catch.spec_methods.each do |method|
|
5
|
+
define_method "catch_#{method}" do |&block|
|
6
|
+
Catch.public_send(method,&block)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
Release.spec_methods.each do |method|
|
11
|
+
define_method "release_#{method}" do |*args, &block|
|
12
|
+
Release.public_send(method,*args,&block)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'catch_and_release/rspec'
|
3
|
+
|
4
|
+
RSpec.configure do |c|
|
5
|
+
c.include CatchAndRelease::RSpec
|
6
|
+
end
|
7
|
+
|
8
|
+
describe CatchAndRelease::RSpec do
|
9
|
+
it "includes methods in RSpec scope" do
|
10
|
+
expect( respond_to?(:catch_stdout) ).to be_truthy
|
11
|
+
end
|
12
|
+
it "passes blocks methods" do
|
13
|
+
out = catch_stdout do
|
14
|
+
print 'hello world'
|
15
|
+
end
|
16
|
+
|
17
|
+
expect( out ).to eq 'hello world'
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catch_and_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Sloan
|
@@ -18,10 +18,12 @@ extra_rdoc_files: []
|
|
18
18
|
files:
|
19
19
|
- lib/catch_and_release/catch.rb
|
20
20
|
- lib/catch_and_release/release.rb
|
21
|
+
- lib/catch_and_release/rspec.rb
|
21
22
|
- lib/catch_and_release/version.rb
|
22
23
|
- lib/catch_and_release.rb
|
23
24
|
- spec/lib/catch_and_release/catch_spec.rb
|
24
25
|
- spec/lib/catch_and_release/release_spec.rb
|
26
|
+
- spec/lib/catch_and_release/rspec_spec.rb
|
25
27
|
- spec/lib/catch_and_release_spec.rb
|
26
28
|
- spec/spec_helper.rb
|
27
29
|
homepage: http://github.com/stevenosloan/catch_and_release
|
@@ -51,5 +53,6 @@ summary: Tools for testing standard inputs & outputs
|
|
51
53
|
test_files:
|
52
54
|
- spec/lib/catch_and_release/catch_spec.rb
|
53
55
|
- spec/lib/catch_and_release/release_spec.rb
|
56
|
+
- spec/lib/catch_and_release/rspec_spec.rb
|
54
57
|
- spec/lib/catch_and_release_spec.rb
|
55
58
|
- spec/spec_helper.rb
|