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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a00e8009a9d6f036bfd27245be285d3985985cf
4
- data.tar.gz: 4fcce697242148911f555789f0f1ed5953fd9c1b
3
+ metadata.gz: a2ae470fdd1816f25a04565044fc4ea03815db19
4
+ data.tar.gz: 0903cdd3bf626aaad1b767548b2263563bd322cf
5
5
  SHA512:
6
- metadata.gz: 185dfb63e4f6d0f5e53f3345008ce4411db5bf01103934fad58ddfc422061cca815f549d14663626c275eaa2744c0b7da5edd92fb007ea244c0350702536a682
7
- data.tar.gz: e27f2f2474967b8a06d94788b3a76795005ad95894c4916d052da4aba6c976a564f68b212865cf18feee279f1b61c993ce66fb5abb8b32473bb6fceac547c5b1
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 = Proc.new do |*args|
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
@@ -1,3 +1,3 @@
1
1
  module AlwaysExecute
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  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.1
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: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec