Roman2K-rails-test-serving 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ Tired of waiting 10 seconds before your tests run? RailsTestServing can make the
3
3
  == Usage
4
4
 
5
5
  1. Install the gem:
6
- gem install Roman2K-rails-test-serving -v '>= 0.1.1' -s http://gems.github.com
6
+ gem install Roman2K-rails-test-serving -v '>= 0.1.3' -s http://gems.github.com
7
7
 
8
8
  2. Insert the following lines at the very top of <tt>test/test_helper.rb</tt>:
9
9
  require 'rubygems'
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'echoe'
2
2
 
3
- Echoe.new('rails-test-serving', '0.1.2') do |p|
3
+ Echoe.new('rails-test-serving', '0.1.3') do |p|
4
4
  p.description = "Makes unit tests of a Rails application run instantly"
5
5
  p.url = "https://github.com/Roman2K/rails-test-serving"
6
6
  p.author = "Roman Le Négrate"
@@ -26,7 +26,7 @@ module RailsTestServing
26
26
  root = root.cleanpath
27
27
 
28
28
  # Adjust load path
29
- $: << root << root.join('test')
29
+ $: << root.to_s << root.join('test').to_s
30
30
 
31
31
  # Ensure socket directory exists
32
32
  path = root.join(*SOCKET_PATH)
@@ -372,6 +372,9 @@ module RailsTestServing
372
372
 
373
373
  def clean_up_app
374
374
  ActionController::Dispatcher.new(StringIO.new).cleanup_application
375
+ if defined?(Fixtures) && Fixtures.respond_to?(:reset_cache)
376
+ Fixtures.reset_cache
377
+ end
375
378
 
376
379
  # Reload files that match :reload here instead of in reload_app since the
377
380
  # :reload option is intended to target files that don't change between two
@@ -388,7 +391,6 @@ module RailsTestServing
388
391
  end
389
392
 
390
393
  def reload_app
391
- reload_specified_source_files
392
394
  ActionController::Dispatcher.new(StringIO.new).reload_application
393
395
  end
394
396
 
@@ -404,7 +406,7 @@ module RailsTestServing
404
406
  $".replace($" - to_reload)
405
407
 
406
408
  to_reload.each do |file|
407
- require file.split('.').first # remove extension, most likely '.rb'
409
+ require file
408
410
  end
409
411
  end
410
412
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rails-test-serving}
5
- s.version = "0.1.2"
5
+ s.version = "0.1.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Roman Le N\303\251grate"]
9
- s.date = %q{2008-11-18}
9
+ s.date = %q{2008-11-21}
10
10
  s.description = %q{Makes unit tests of a Rails application run instantly}
11
11
  s.email = %q{roman.lenegrate@gmail.com}
12
12
  s.extra_rdoc_files = ["lib/rails_test_serving.rb", "LICENSE", "README.rdoc"]
@@ -275,7 +275,7 @@ class RailsTestServing::CleanerTest < Test::Unit::TestCase
275
275
  $".replace ["foo.rb", "bar.rb"]
276
276
  RailsTestServing.stubs(:options).returns({:reload => [/foo/]})
277
277
 
278
- Cleaner.any_instance.expects(:require).with("foo").once
278
+ Cleaner.any_instance.expects(:require).with("foo.rb").once
279
279
  Cleaner.new.instance_eval { reload_specified_source_files }
280
280
  assert_equal ["bar.rb"], $"
281
281
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Roman2K-rails-test-serving
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Roman Le N\xC3\xA9grate"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-18 00:00:00 -08:00
12
+ date: 2008-11-21 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15