Permalink
Browse files

Update mocha version to 0.13.0 and change requires

  • Loading branch information...
carlosantoniodasilva committed Nov 12, 2012
1 parent 25b23d7 commit 17ccefc4360caea1a80eada324513dc6cb809c75
View
@@ -22,7 +22,7 @@ end
gem 'uglifier', '>= 1.0.3', :require => false
gem 'rake', '>= 0.8.7'
-gem 'mocha', '~> 0.12.1'
+gem 'mocha', '>= 0.13.0', :require => false
group :doc do
# The current sdoc cannot generate GitHub links due
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'sprockets'
require 'sprockets/helpers/rails_helper'
-require 'mocha'
+require 'mocha/setup'
class SprocketsHelperTest < ActionView::TestCase
include Sprockets::Helpers::RailsHelper
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'sprockets'
require 'sprockets/helpers/rails_helper'
-require 'mocha'
+require 'mocha/setup'
class SprocketsHelperWithRoutesTest < ActionView::TestCase
include Sprockets::Helpers::RailsHelper
@@ -54,4 +54,4 @@ def setup
stylesheet_link_tag(:application)
end
-end
+end
@@ -4,7 +4,7 @@
require 'test/unit'
require 'stringio'
-require 'mocha'
+require 'mocha/setup'
require 'active_record'
require 'active_support/dependencies'
@@ -10,7 +10,7 @@
require 'active_support/json'
require 'active_support/ordered_hash'
require 'active_support/core_ext/hash/conversions'
-require 'mocha'
+require 'mocha/setup'
class BaseTest < Test::Unit::TestCase
def setup
@@ -4,4 +4,4 @@
# Fake Mocha::ExpectationError so we can rescue it in #run. Bleh.
Object.const_set :Mocha, Module.new
Mocha.const_set :ExpectationError, Class.new(StandardError)
-end
+end
@@ -116,7 +116,6 @@ def retrieve_mocha_counter(test_case, result) #:nodoc:
end
end
end
-
end
end
end
@@ -25,7 +25,7 @@
require 'test/unit'
require 'empty_bool'
-silence_warnings { require 'mocha' }
+silence_warnings { require 'mocha/setup' }
ENV['NO_RELOAD'] = '1'
require 'active_support'
@@ -1,6 +1,7 @@
require "isolation/abstract_unit"
require "active_support/log_subscriber/test_helper"
require "rack/test"
+require "mocha/setup"
module ApplicationTests
module RackTests
@@ -1,5 +1,5 @@
require 'test/unit'
-require 'mocha'
+require 'mocha/setup'
require 'rails/application/route_inspector'
require 'action_controller'
require 'rails/engine'
@@ -1,7 +1,7 @@
require 'generators/generators_test_helper'
require 'rails/generators/rails/model/model_generator'
require 'rails/generators/test_unit/model/model_generator'
-require 'mocha'
+require 'mocha/setup'
class GeneratorsTest < Rails::Generators::TestCase
include GeneratorsTestHelper
@@ -201,7 +201,7 @@ def test_source_paths_for_not_namespaced_generators
mspec = Rails::Generators.find_by_namespace :fixjour
assert mspec.source_paths.include?(File.join(Rails.root, "lib", "templates", "fixjour"))
end
-
+
def test_usage_with_embedded_ruby
require File.expand_path("fixtures/lib/generators/usage_template/usage_template_generator", File.dirname(__FILE__))
output = capture(:stdout) { Rails::Generators.invoke :usage_template, ['--help'] }

0 comments on commit 17ccefc

Please sign in to comment.