lspace 0.11 → 0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +12 -0
  2. data/lib/lspace/rspec.rb +7 -0
  3. data/lspace.gemspec +1 -1
  4. metadata +2 -1
data/README.md CHANGED
@@ -208,3 +208,15 @@ end
208
208
  A new `LSpace` will by default inherit everything from its parent, so it's better to store
209
209
  `LSpace.new` than `LSpace.current`, so that if the user mutates their LSpace in a
210
210
  callback, the change does not propagate upwards.
211
+
212
+ Testing
213
+ =======
214
+
215
+ If you're using `LSpace`, you probably want each test case to run in its own `LSpace` so
216
+ that tests cannot pollute each other. If you're using rspec you can do this with:
217
+
218
+ ```ruby
219
+ require 'lspace/rspec'
220
+ ```
221
+
222
+ If not, you'll have to add an around filter yourself.
@@ -0,0 +1,7 @@
1
+ RSpec.configure do |c|
2
+ c.around(:each) do |example|
3
+ LSpace.clean do
4
+ example.run
5
+ end
6
+ end
7
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "lspace"
3
- s.version = "0.11"
3
+ s.version = "0.12"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.author = "Conrad Irwin"
6
6
  s.email = "conrad.irwin@gmail.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lspace
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.11'
4
+ version: '0.12'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -140,6 +140,7 @@ files:
140
140
  - lib/lspace/class_methods.rb
141
141
  - lib/lspace/core_ext.rb
142
142
  - lib/lspace/eventmachine.rb
143
+ - lib/lspace/rspec.rb
143
144
  - lib/lspace/thread.rb
144
145
  - lspace.gemspec
145
146
  - spec/celluloid_spec.rb