Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support mocha 1.0, Ruby 2 #32

Closed
wants to merge 1 commit into from

6 participants

@eac

No description provided.

@dyfrgi

Why drop support for earlier mocha? This doesn't look like it'd break that, though I haven't checked the require 'mocha/mock' to see when that came in.

@eac

require 'mocha/mock' was just copied from mocha's test. I can update the gemspec if you'd like to continue supporting the old version of mocha.

@eac
eac commented

bump

@ktdreyer

Hi all, any remaining blockers, or can this be merged?

@jferris
Admin

@sikachu any objections to me merging this in?

@kitop

Any news on this one or #34? Both seem to work, and would be nice to support newer mocha versions

@jferris
Admin

Thanks. I ended up merging #34, as it was more conservative, and the tests are also passing on Ruby 2.1.

@jferris jferris closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2014
  1. Support mocha 1.0, Ruby 2

    Eric Chapweske authored
This page is out of date. Refresh to see the latest.
View
2  bourne.gemspec
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
# Follow instructions in test/unit/mock_test.rb to update.
- s.add_dependency('mocha', '>= 0.13.2', '< 0.15')
+ s.add_dependency('mocha', '>= 1.0', '< 2.0')
s.add_development_dependency('rake')
end
View
2  test/unit/assert_received_test.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), "..", "test_helper")
+require_relative "../test_helper"
require 'test_runner'
require 'bourne/api'
require 'bourne/mockery'
View
2  test/unit/have_received_test.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), "..", "test_helper")
+require_relative "../test_helper"
require 'test_runner'
require 'bourne/api'
require 'bourne/mockery'
View
2  test/unit/invocation_test.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), "..", "test_helper")
+require_relative "../test_helper"
require 'bourne/invocation'
class InvocationTest < Test::Unit::TestCase
View
5 test/unit/mock_test.rb
@@ -1,9 +1,10 @@
# to update:
# - copy new code from https://raw.github.com/freerange/mocha/master/test/unit/mock_test.rb
-# - keep: require 'bourne/mock'
+# - keep: require 'bourne/mockery'
# - keep: FakeExpectation test
require File.expand_path('../../test_helper', __FILE__)
-require 'bourne/mock'
+require 'bourne/mockery'
+require 'mocha/mock'
require 'mocha/expectation_error_factory'
require 'set'
require 'simple_counter'
View
2  test/unit/mockery_test.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../test_helper', __FILE__)
+require_relative '../test_helper'
require 'bourne/mockery'
require 'mocha/state_machine'
require 'bourne/invocation'
Something went wrong with that request. Please try again.