tconsole 1.0.1pre2 → 1.0.1pre3

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.
@@ -19,11 +19,16 @@ module TConsole
19
19
  ENV["RAILS_ENV"] ||= "test"
20
20
  $:.unshift("./test")
21
21
 
22
- require 'rake'
23
- Rake.application.init
24
- Rake.application.load_rakefile
25
- Rake.application.invoke_task("db:test:load")
26
- Rake.application.invoke_task("test:prepare")
22
+ # This is definitely based on Sporks rails startup code. I tried initially to use Rake to get things done
23
+ # and match the test environment a bit better, but it didn't work out well at all
24
+ # TODO: Figure out how ot get rake db:test:load and rake test:prepare working in this context
25
+ require "./config/application"
26
+ ::Rails.application
27
+ ::Rails::Engine.class_eval do
28
+ def eager_load!
29
+ # turn off eager_loading, all together
30
+ end
31
+ end
27
32
  rescue Exception => e
28
33
  puts "Error - Loading your environment failed: #{e.message}"
29
34
  if config[:trace] == true
@@ -57,18 +62,18 @@ module TConsole
57
62
  require File.realpath(path)
58
63
  end
59
64
 
60
- if defined? ActiveRecord
61
- ActiveRecord::Base.connection.reconnect!
65
+ if defined? ::ActiveRecord
66
+ ::ActiveRecord::Base.connection.reconnect!
62
67
  end
63
68
 
64
- if defined?(MiniTest)
69
+ if defined?(::MiniTest)
65
70
  require File.join(File.dirname(__FILE__), "minitest_handler")
66
71
 
67
72
  MiniTestHandler.run(name_pattern)
68
- elsif defined?(Test::Unit)
73
+ elsif defined?(::Test::Unit)
69
74
  puts "Sorry, but tconsole doesn't support Test::Unit yet"
70
75
  return
71
- elsif defined?(RSpec)
76
+ elsif defined?(::RSpec)
72
77
  puts "Sorry, but tconsole doesn't support RSpec yet"
73
78
  return
74
79
  end
@@ -1,3 +1,3 @@
1
1
  module TConsole
2
- VERSION = "1.0.1pre2"
2
+ VERSION = "1.0.1pre3"
3
3
  end
data/lib/tconsole.rb CHANGED
@@ -121,9 +121,9 @@ module TConsole
121
121
  return true
122
122
  elsif args[0] == "help"
123
123
  print_help
124
- elsif args[0] == "units"
124
+ elsif args[0] == "units" || args[0] == "unit"
125
125
  server.run_tests(["test/unit/**/*_test.rb"], args[1])
126
- elsif args[0] == "functionals"
126
+ elsif args[0] == "functionals" || args[0] == "functional"
127
127
  server.run_tests(["test/functional/**/*_test.rb"], args[1])
128
128
  elsif args[0] == "integration"
129
129
  server.run_tests(["test/integration/**/*_test.rb"], args[1])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tconsole
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1pre2
4
+ version: 1.0.1pre3
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-25 00:00:00.000000000 Z
12
+ date: 2012-01-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! " tconsole allows Rails developers to easily and quickly run their
15
15
  tests as a whole or in subsets. It forks the testing processes from\n a preloaded
@@ -47,7 +47,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  segments:
49
49
  - 0
50
- hash: 185882967550172537
50
+ hash: -349590127225320019
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements: