em-rspec 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +0 -0
  2. data/lib/em-rspec.rb +1 -0
  3. data/lib/patch.rb +21 -0
  4. metadata +79 -0
data/README.md ADDED
File without changes
data/lib/em-rspec.rb ADDED
@@ -0,0 +1 @@
1
+ require File.expand_path File.dirname(__FILE__) + '/patch.rb'
data/lib/patch.rb ADDED
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'fiber'
3
+ rescue LoadError
4
+ raise LoadError.new "em-rspec requires the Fiber class. (Available in core Ruby 1.9)"
5
+ end
6
+
7
+ require 'eventmachine'
8
+
9
+ RSpec::Core::Example.class_eval do
10
+ alias ignorant_run run
11
+
12
+ def run(example_group_instance, reporter)
13
+ Fiber.new do
14
+ EM.run do
15
+ EM.next_tick { EM.stop }
16
+ ignorant_run example_group_instance, reporter
17
+ end
18
+ end.resume
19
+ end
20
+
21
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: em-rspec
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: "0.1"
6
+ platform: ruby
7
+ authors:
8
+ - Stevie Graham
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-07-25 00:00:00 +01:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: eventmachine
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: 0.12.10
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 2.5.0
36
+ type: :development
37
+ version_requirements: *id002
38
+ description: "Test EventMachine code in RSpec 2 "
39
+ email: sjtgraham@mac.com
40
+ executables: []
41
+
42
+ extensions: []
43
+
44
+ extra_rdoc_files: []
45
+
46
+ files:
47
+ - README.md
48
+ - lib/em-rspec.rb
49
+ - lib/patch.rb
50
+ has_rdoc: true
51
+ homepage: http://github.com/stevegraham/em-rspec
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options: []
56
+
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.9.1
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: "0"
71
+ requirements: []
72
+
73
+ rubyforge_project:
74
+ rubygems_version: 1.5.2
75
+ signing_key:
76
+ specification_version: 3
77
+ summary: Test EventMachine code in RSpec 2
78
+ test_files: []
79
+