Skip to content
Browse files

Updated test environment

  • Loading branch information...
1 parent 6baefb4 commit c86621d39bff5f6b08edf3a55c2c81a23b9208c3 @bcardarella bcardarella committed
Showing with 21 additions and 11 deletions.
  1. +6 −0 Gemfile
  2. +1 −0 client_side_validations.gemspec
  3. +14 −0 test/base_helper.rb
  4. +0 −11 test/middleware/cases/helper.rb
View
6 Gemfile
@@ -2,3 +2,9 @@ source "http://rubygems.org"
# Specify your gem's dependencies in client_side_validations.gemspec
gemspec
+
+if RUBY_VERSION >= '1.9.3'
+ gem 'debugger'
+elsif RUBY_VERSION < '1.9'
+ gem 'minitest'
+end
View
1 client_side_validations.gemspec
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'mocha'
s.add_development_dependency 'simple_form', '~> 1.5.0'
s.add_development_dependency 'formtastic', '~> 2.0.0'
+ s.add_development_dependency 'm'
# For QUnit testing
s.add_development_dependency 'sinatra', '~> 1.0'
View
14 test/base_helper.rb
@@ -2,6 +2,20 @@
require 'bundler'
Bundler.setup
require 'test/unit'
+if RUBY_VERSION >= '1.9.3'
+ require 'debugger'
+end
require 'mocha'
+require 'rails'
+
+# Pulled from railties/test/abstract_unit in Rails 3.1
+module TestApp
+ class Application < Rails::Application
+ config.root = File.dirname(__FILE__)
+ config.active_support.deprecation = :log
+ config.logger = Logger.new(STDOUT)
+ end
+end
+
module ClientSideValidations; end
View
11 test/middleware/cases/helper.rb
@@ -1,17 +1,6 @@
require 'base_helper'
require 'action_controller'
require 'action_controller/railtie'
-require 'rails'
-
-# Pulled from railties/test/abstract_unit in Rails 3.1
-module TestApp
- class Application < Rails::Application
- config.root = File.dirname(__FILE__)
- config.active_support.deprecation = :log
- config.logger = Logger.new(STDOUT)
- end
-end
-
require 'client_side_validations/middleware'
require 'client_side_validations/engine'

0 comments on commit c86621d

Please sign in to comment.
Something went wrong with that request. Please try again.