Roman2K-rails-test-serving 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +12 -5
- data/lib/rails_test_serving.rb +7 -4
- data/rails-test-serving.gemspec +4 -4
- data/test/rails_test_serving_test.rb +1 -0
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -2,15 +2,22 @@ Tired of waiting 10 seconds before your tests run? RailsTestServing can make the
|
|
2
2
|
|
3
3
|
== Quick usage instructions
|
4
4
|
|
5
|
-
1.
|
5
|
+
1. Install the gem:
|
6
|
+
gem install Roman2K-rails-test-serving -v '>= 0.1.1' -s http://gems.github.com
|
7
|
+
|
8
|
+
2. Insert the following lines at the very top of <tt>test/test_helper.rb</tt>:
|
9
|
+
require 'rubygems'
|
6
10
|
require 'rails_test_serving'
|
7
11
|
RailsTestServing.boot
|
8
12
|
|
9
|
-
|
13
|
+
3. Append the following line to <tt>~/.bash_login</tt>:
|
14
|
+
export RUBYLIB="test:$RUBYLIB"
|
15
|
+
|
16
|
+
4. Start the server:
|
10
17
|
cd <project-dir>
|
11
18
|
ruby test/test_helper.rb --serve
|
12
19
|
|
13
|
-
|
20
|
+
5. Run tests as you usually do:
|
14
21
|
ruby test/unit/account_test.rb
|
15
22
|
ruby test/unit/account_test.rb -n /balance/
|
16
23
|
As a consequence, they work in RubyMate too (⌘R in TextMate).
|
@@ -19,8 +26,8 @@ Tired of waiting 10 seconds before your tests run? RailsTestServing can make the
|
|
19
26
|
|
20
27
|
== Caveats
|
21
28
|
|
22
|
-
*
|
23
|
-
|
29
|
+
* Tested working with Rails 2.1.2 up to 2.2.0 RC2. Compatibility with versions of Rails out of that range is guaranteed.
|
30
|
+
* There might exist some quirks: search for "TODO" in the source. I can bear them but contributions are welcome.
|
24
31
|
* Some unit tests are left to be written.
|
25
32
|
|
26
33
|
== Credits
|
data/lib/rails_test_serving.rb
CHANGED
@@ -137,7 +137,7 @@ module RailsTestServing
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def enable_dependency_tracking
|
140
|
-
require '
|
140
|
+
require 'config/boot'
|
141
141
|
|
142
142
|
Rails::Configuration.class_eval do
|
143
143
|
unless method_defined? :cache_classes
|
@@ -155,7 +155,10 @@ module RailsTestServing
|
|
155
155
|
end
|
156
156
|
|
157
157
|
def load_framework
|
158
|
-
Client.disable
|
158
|
+
Client.disable do
|
159
|
+
$: << 'test'
|
160
|
+
require 'test_helper'
|
161
|
+
end
|
159
162
|
end
|
160
163
|
|
161
164
|
def perform_run(file, argv)
|
@@ -335,7 +338,7 @@ module RailsTestServing
|
|
335
338
|
end
|
336
339
|
|
337
340
|
def clean_up_app
|
338
|
-
ActionController::Dispatcher.new.cleanup_application
|
341
|
+
ActionController::Dispatcher.new(StringIO.new).cleanup_application
|
339
342
|
end
|
340
343
|
|
341
344
|
def remove_tests
|
@@ -346,7 +349,7 @@ module RailsTestServing
|
|
346
349
|
end
|
347
350
|
|
348
351
|
def reload_app
|
349
|
-
ActionController::Dispatcher.new.reload_application
|
352
|
+
ActionController::Dispatcher.new(StringIO.new).reload_application
|
350
353
|
end
|
351
354
|
end
|
352
355
|
end unless defined? RailsTestServing
|
data/rails-test-serving.gemspec
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Rails-test-serving-0.1.
|
2
|
+
# Gem::Specification for Rails-test-serving-0.1.1
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
--- !ruby/object:Gem::Specification
|
6
6
|
name: rails-test-serving
|
7
7
|
version: !ruby/object:Gem::Version
|
8
|
-
version: 0.1.
|
8
|
+
version: 0.1.1
|
9
9
|
platform: ruby
|
10
10
|
authors:
|
11
11
|
- "Roman Le N\xC3\xA9grate"
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
|
15
|
-
date: 2008-11-
|
15
|
+
date: 2008-11-17 00:00:00 +01:00
|
16
16
|
default_executable:
|
17
17
|
dependencies: []
|
18
18
|
|
@@ -30,10 +30,10 @@ files:
|
|
30
30
|
- lib/rails_test_serving.rb
|
31
31
|
- LICENSE
|
32
32
|
- Manifest
|
33
|
-
- rails-test-serving.gemspec
|
34
33
|
- Rakefile
|
35
34
|
- README.rdoc
|
36
35
|
- test/rails_test_serving_test.rb
|
36
|
+
- rails-test-serving.gemspec
|
37
37
|
has_rdoc: true
|
38
38
|
homepage: https://github.com/Roman2K/rails-test-serving
|
39
39
|
post_install_message:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Roman2K-rails-test-serving
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Roman Le N\xC3\xA9grate"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
|
-
date: 2008-11-
|
11
|
+
date: 2008-11-16 15:00:00 -08:00
|
12
12
|
default_executable:
|
13
13
|
dependencies: []
|
14
14
|
|
@@ -26,10 +26,10 @@ files:
|
|
26
26
|
- lib/rails_test_serving.rb
|
27
27
|
- LICENSE
|
28
28
|
- Manifest
|
29
|
-
- rails-test-serving.gemspec
|
30
29
|
- Rakefile
|
31
30
|
- README.rdoc
|
32
31
|
- test/rails_test_serving_test.rb
|
32
|
+
- rails-test-serving.gemspec
|
33
33
|
has_rdoc: true
|
34
34
|
homepage: https://github.com/Roman2K/rails-test-serving
|
35
35
|
post_install_message:
|