ZenTest 3.5.1 → 3.5.2

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.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ *** 3.5.2
2
+
3
+ + 4 bug fixes:
4
+ + Patch up Rails fixture defaults for Test::Rails::TestCase.
5
+ + Session now properly hooked up to controllers.
6
+ + ruby 1.8.6 has a bug on 'raise Interrupt' with no args. Fixed on both sides.
7
+ + Fixed redgreen to work with new getc/putc-based output. (from Finn Smith)
8
+
1
9
  *** 3.5.1 / 2007-04-17
2
10
 
3
11
  + 4 bug fixes:
data/lib/autotest.rb CHANGED
@@ -174,7 +174,7 @@ class Autotest
174
174
  @interrupted = true
175
175
  sleep 1.5
176
176
  end
177
- raise Interrupt # let the run loop catch it
177
+ raise Interrupt, nil # let the run loop catch it
178
178
  end
179
179
  end
180
180
  end
@@ -5,12 +5,9 @@ module Autotest::RedGreen
5
5
  BAR = "=" * 80
6
6
 
7
7
  Autotest.add_hook :ran_command do |at|
8
- output = at.results.join
9
- at.results.each do |line|
10
- line.gsub!(/^.* (\d+) failures, (\d+) errors$/) { |match|
11
- code = ($1 != "0" or $2 != "0") ? 31 : 32
12
- "\e[#{code}m#{BAR}\n#{match}\e[0m\n\n"
13
- }
8
+ if at.results.last.match(/^.* (\d+) failures, (\d+) errors$/)
9
+ code = ($1 != "0" or $2 != "0") ? 31 : 32
10
+ puts "\e[#{code}m#{BAR}\e[0m\n\n"
14
11
  end
15
12
  end
16
13
  end
@@ -38,6 +38,9 @@ class Test::Rails::FunctionalTestCase < Test::Rails::TestCase
38
38
  @request = ActionController::TestRequest.new
39
39
  @request.session = @session
40
40
 
41
+ # HACK There's probably an official way to do this
42
+ @controller.instance_variable_set :@_session, @request.session
43
+
41
44
  @response = ActionController::TestResponse.new
42
45
 
43
46
  setup_extra if respond_to? :setup_extra
@@ -7,5 +7,9 @@ class Test::Rails::TestCase < Test::Unit::TestCase
7
7
 
8
8
  undef_method :default_test
9
9
 
10
+ # Set defaults because Rails has poor ones (and these don't inherit properly)
11
+ self.use_transactional_fixtures = true
12
+ self.use_instantiated_fixtures = false
13
+
10
14
  end
11
15
 
data/lib/zentest.rb CHANGED
@@ -56,7 +56,7 @@ end
56
56
 
57
57
  class ZenTest
58
58
 
59
- VERSION = '3.5.1'
59
+ VERSION = '3.5.2'
60
60
 
61
61
  include ZenTestMapping
62
62
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0.9
3
3
  specification_version: 1
4
4
  name: ZenTest
5
5
  version: !ruby/object:Gem::Version
6
- version: 3.5.1
7
- date: 2007-04-17 00:00:00 -04:00
6
+ version: 3.5.2
7
+ date: 2007-04-30 00:00:00 -07:00
8
8
  summary: "ZenTest provides 4 different tools and 1 library: zentest, unit_diff, autotest, multiruby, and Test::Rails."
9
9
  require_paths:
10
10
  - lib