always_execute 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/always_execute/rspec_execute.rb +10 -1
- data/lib/always_execute/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2ae470fdd1816f25a04565044fc4ea03815db19
|
4
|
+
data.tar.gz: 0903cdd3bf626aaad1b767548b2263563bd322cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16a7165c2a0d8c6ec046670e1a2759e649cad5b94dce027d4ccb4f961f464c45a9348ae2d89e5d2c080a6cc3ed83a802f0490224f410ad17bc2d9a5c8cd7ff8d
|
7
|
+
data.tar.gz: e4727a631939903947a623fd88d074106509f1e0f77d68049cd30abf9151ceff0557588c4f143734164909d7a57dd65d4bff3bb2218199e6b75d702a51c8812f
|
@@ -3,9 +3,18 @@ module RSpec
|
|
3
3
|
class Example
|
4
4
|
alias :initialize_without_execute :initialize
|
5
5
|
|
6
|
+
class ProcWithDelegateSource < Proc
|
7
|
+
attr_reader :source_location
|
8
|
+
|
9
|
+
def initialize(delegate, &block)
|
10
|
+
@source_location = delegate.source_location
|
11
|
+
super(&block)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
6
15
|
def initialize(example_group_class, description, metadata, example_block=nil)
|
7
16
|
if example_block
|
8
|
-
example_block_with_execute =
|
17
|
+
example_block_with_execute = ProcWithDelegateSource.new(example_block) do |*args|
|
9
18
|
if @execute_block
|
10
19
|
self.instance_variable_set('@execute_result', instance_exec(&@execute_block))
|
11
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: always_execute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Pearce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|