rspec-eventmachine 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 17e543647dd05ac7f1b5491269437b109523b8db
4
+ data.tar.gz: 58fd6a447f4551afb71e58e5cab37063ced81f8b
5
+ SHA512:
6
+ metadata.gz: 6272c032aa5d2827f83e8c36cf7913df10600dec251b9595075e14fecb48cebbf9a7d7c03a8b10f6f40eda2623e70d6f11bb30b859c30241c62bd0ea00df8d6b
7
+ data.tar.gz: 5369b299bbb90907fd30926e7c05111c6af182f3652f9ba6859a88f4658295fa1e31e94b5528bffebbccd2b196ecf4eb8fe4353f3fac948ad93872427ae051c9
@@ -10,8 +10,8 @@ module RSpec::EM
10
10
 
11
11
  return if instance_methods(false).map { |m| m.to_s }.include?(async_method_name) or
12
12
  method_name.to_s =~ /^async_/
13
-
14
- module_eval <<-RUBY
13
+
14
+ module_eval <<-RUBY, __FILE__, __LINE__ + 1
15
15
  alias :#{async_method_name} :#{method_name}
16
16
 
17
17
  def #{method_name}(*args)
@@ -36,9 +36,9 @@ module RSpec::EM
36
36
  method_name, args = step.shift, step
37
37
  begin
38
38
  method(method_name).call(*args) { __run_next_step__ }
39
- rescue Object => error
40
- @example.set_exception(error) if @example
39
+ rescue Object
41
40
  __end_steps__
41
+ raise
42
42
  end
43
43
  end
44
44
 
@@ -49,14 +49,10 @@ module RSpec::EM
49
49
 
50
50
  def verify_mocks_for_rspec
51
51
  EventMachine.reactor_running? ? false : super
52
- rescue Object => error
53
- @example.set_exception(error) if @example
54
52
  end
55
53
 
56
54
  def teardown_mocks_for_rspec
57
55
  EventMachine.reactor_running? ? false : super
58
- rescue Object => error
59
- @example.set_exception(error) if @example
60
56
  end
61
57
  end
62
58
 
@@ -64,9 +60,9 @@ module RSpec::EM
64
60
  end
65
61
 
66
62
  class RSpec::Core::Example
67
- hook_method = %w[with_around_hooks with_around_each_hooks].find { |m| instance_method(m) rescue nil }
68
-
69
- class_eval %Q{
63
+ hook_method = %w[with_around_hooks with_around_each_hooks with_around_example_hooks].find { |m| instance_method(m) rescue nil }
64
+
65
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
70
66
  alias :synchronous_run :#{hook_method}
71
67
 
72
68
  def #{hook_method}(*args, &block)
@@ -78,6 +74,5 @@ class RSpec::Core::Example
78
74
  synchronous_run(*args, &block)
79
75
  end
80
76
  end
81
- }
77
+ RUBY
82
78
  end
83
-
metadata CHANGED
@@ -1,48 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-eventmachine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - James Coglan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-28 00:00:00.000000000 Z
11
+ date: 2014-07-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: eventmachine
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.12.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.12.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '2.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '4.0'
38
37
  type: :runtime
39
38
  prerelease: false
40
39
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
40
  requirements:
43
- - - ~>
41
+ - - ">="
44
42
  - !ruby/object:Gem::Version
45
43
  version: '2.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '4.0'
46
47
  description:
47
48
  email: jcoglan@gmail.com
48
49
  executables: []
@@ -51,37 +52,36 @@ extra_rdoc_files:
51
52
  - README.md
52
53
  files:
53
54
  - README.md
55
+ - lib/rspec/em.rb
54
56
  - lib/rspec/eventmachine.rb
55
57
  - lib/rspec/eventmachine/async_steps.rb
56
58
  - lib/rspec/eventmachine/fake_clock.rb
57
- - lib/rspec/em.rb
58
59
  homepage: http://github.com/jcoglan/rspec-eventmachine
59
60
  licenses:
60
61
  - MIT
62
+ metadata: {}
61
63
  post_install_message:
62
64
  rdoc_options:
63
- - --main
65
+ - "--main"
64
66
  - README.md
65
- - --markup
67
+ - "--markup"
66
68
  - markdown
67
69
  require_paths:
68
70
  - lib
69
71
  required_ruby_version: !ruby/object:Gem::Requirement
70
- none: false
71
72
  requirements:
72
- - - ! '>='
73
+ - - ">="
73
74
  - !ruby/object:Gem::Version
74
75
  version: '0'
75
76
  required_rubygems_version: !ruby/object:Gem::Requirement
76
- none: false
77
77
  requirements:
78
- - - ! '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 1.8.23
83
+ rubygems_version: 2.2.2
84
84
  signing_key:
85
- specification_version: 3
85
+ specification_version: 4
86
86
  summary: RSpec extensions for testing EventMachine code
87
87
  test_files: []