Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Activity (RSS)

Monday, October 26 2009
57 stubbing method chains was created
  • James Mead
    James Mead created the ticket at 7:02 PM

    There have been various requests for this feature - one notably usage is for named_scopes in Rails.

    These are a couple of significant threads on the mailing lis...

54 Examples not correctly linked when generating RDoc using Hanna was updated
  • James Mead
    • State changed from new to open
    by James Mead at 6:58 PM
56 Stubbed method not being returned to its original state at the end of a test was updated
  • James Mead
    James Mead commented at 4:00 PM

    It doesn't appear to be significant that it's the new method that is being stubbed. The following test fails with a similar error :-

      unexpected invocation: B...
  • James Mead
    • State changed from new to open
    by James Mead at 3:56 PM

    I wonder whether it's significant that it's the new method that is being stubbed.

  • James Mead
    James Mead created the ticket at 3:54 PM

    Reported on behalf of Gareth Reeves :-

    Running the following code gives a single expectation error in TestB#setup :-

      unexpected invocation: B.new()
    

    It's lik...

Thursday, October 08 2009
55 Running the test suite on 1.9 HEAD was updated
  • James Mead
    James Mead commented at 9:38 AM

    Note to self: I just tried running unit tests on Ruby 1.9.1-p0 and they all pass even without the test-unit gem installed. I need to try this with a newer versi...

Wednesday, October 07 2009
55 Running the test suite on 1.9 HEAD was updated
  • James Mead
    • State changed from new to open
    by James Mead at 6:29 PM
  • James Mead
    • Tag changed from ruby19 to acceptance, ruby19, testing
    by James Mead at 6:29 PM

    This is correct. I did do some work on fixing this a while ago - I'll see if I can dig out the code.

    As a workaround, you should be able to run the tests on Rub...

  • Eloy Duran
    Eloy Duran created the ticket at 6:01 PM

    The unit tests run after applying this patch: http://github.com/alloy/mocha/commit/16c1b359aba9180921424f7556c1a2...

    The acceptance tests, and with it the perf...

Friday, October 02 2009
54 Examples not correctly linked when generating RDoc using Hanna was created
  • James Mead
    James Mead created the ticket at 3:38 PM

    On approx 20 Sep 2009, Jens Himmelreich posted this comment on my blog :-

    Hi,

    thanks for the great gem. We use it evertime for our mocking in ruby.

    There is a ...

Friday, September 18 2009
53 NameError raised when using Mocha as a Rails plug-in was updated
  • James Mead
    • State changed from open to resolved
    • Tag changed from bug-report to bug-report, plugin
    by James Mead at 12:10 PM

    I've just released version 0.9.8 which does not load Mocha in the plugin. You will need to explicitly load Mocha after the test framework (as you have already d...

Thursday, September 17 2009
53 NameError raised when using Mocha as a Rails plug-in was updated
  • James Mead
    James Mead commented at 5:18 PM

    Hi Chry,

    Thanks. That's helpful.

    The problem is because of the changes I made in 0.9.6 which mean that Mocha no longer loads the test frameworks (Test::Unit or ...

Wednesday, September 16 2009
53 NameError raised when using Mocha as a Rails plug-in was updated
  • Chry Cheng
    Chry Cheng commented at 4:57 PM

    No particular reason. I'm somewhat new to Rails (a few months) and I just followed the directions in http://rubyforge.org/projects/mocha-rails/. I guess the com...

  • James Mead
    • State changed from new to open
    by James Mead at 3:56 PM

    Sorry for the delay in responding to this. I've just managed to reproduce it and am having a think about the best way to fix the problem.

    Just so I'm clear, is ...

Monday, August 17 2009
53 NameError raised when using Mocha as a Rails plug-in was created
  • Chry Cheng
    Chry Cheng created the ticket at 5:51 PM

    I have the following set-up defined in my functional test

    def setup
      @controller.expects(:logged_in?).returns(true)
      @controller.expects(:admin_user?).return...
Saturday, August 08 2009
52 'never' expectation failed: twisted message was created
  • dira
    dira created the ticket at 3:14 PM
    s=''
    s.expects(:fancy).with(2).never
    s.fancy(2)
    

    should result in:

    Mocha::ExpectationError: unexpected invocation: ''.fancy(2)
    

    but it prints:

    Mocha::Expecta...
Friday, July 24 2009
49 Mocha is broken out right on Ruby 1.9.1 in some cases was updated
  • James Mead
    • State changed from new to resolved
    by James Mead at 11:59 PM

    Believed fixed.

46 "expects" in a mock block doesn't return an expectation, if the parameter is ... was updated
  • James Mead
    James Mead commented at 6:38 PM

    I think one way to improve this is for Mock#expects to return an instance of an ExpectationList when it is passed a Hash (instead of returning the Hash which is...

  • tomm
    tomm commented at 4:26 PM

    -1 on allowing at_least_once to apply to >1 expectation. The point of expectation IMO is clarity even to the level of non-developers, and I think the ambiguity ...

51 doc generation fails in 0.9.7 gem was updated
  • James Mead
    James Mead commented at 4:06 PM

    I'm glad it worked. Thanks for testing it so quickly for me.

  • tomm
    • Tag changed from bug, bug-report, gem, rdoc to resolved
    by tomm at 4:01 PM
  • tomm
    tomm commented at 4:00 PM

    James, I pulled head, built gem and installed gem from --local and it generated the docs. Quick fix!

    Tom

  • James Mead
    • State changed from new to open
    • Tag changed from gem to bug, bug-report, gem, rdoc
    by James Mead at 3:34 PM

    Thanks for reporting this. I've just committed what I hope is a fix [1].

    Would you be able to checkout HEAD and see if this fixes the problem for you.

    If it doe...

  • tomm
    tomm created the ticket at 2:22 PM

    If you install the gem from default source, rake generate_docs fails because html_with_google_analytics is not packaged in the gem. After removing this template...

Wednesday, July 01 2009
50 after mocha update from 0.9.5 to 0.9.6 unit tests fails to execute was updated
  • James Mead
    • State changed from open to resolved
    by James Mead at 4:56 PM
  • James Mead
    James Mead commented at 12:17 PM

    It looks like Mocha is being loaded when the thoughtbot-shoulda gem is loaded. This is in turn loading activesupport/testcase.rb which is loading the mocha gem.

    ...
  • James Mead
    • State changed from new to open
    by James Mead at 9:21 AM

    Thanks for the extra information.

    I think the important thing is for me to understand exactly how and when Mocha is being loaded.

    I'm attaching a patched versio...

49 Mocha is broken out right on Ruby 1.9.1 in some cases was updated
  • James Mead
    James Mead commented at 10:03 AM

    Hi Chad,

    There is now a release [1] incorporating the changes I mentioned above.

    It would be really helpful if you could tell me whether the newly released vers...

Tuesday, June 30 2009
50 after mocha update from 0.9.5 to 0.9.6 unit tests fails to execute was updated
  • James Mead
    James Mead commented at 10:15 PM

    Hmm. That's strange. I wonder if there is a difference between versions of RubyGems. What version do you have? I have 1.3.1.

    You could try :-

    require 'test/uni...
  • James Mead
    James Mead commented at 6:03 PM

    I have reproduced the problem with Ruby 1.8.6, Rails 2.3.2 and test-unit gem 2.0.2.

    The main problem seems to be that the test-unit gem is not being loaded befo...

  • James Mead
    • Tag set to bug-report
    by James Mead at 5:46 PM

    Thanks for reporting the problem. I'd be really grateful if you could supply us with a bit more information :-

    What version of Ruby are you using?

    What version ...

Monday, May 18 2009
49 Mocha is broken out right on Ruby 1.9.1 in some cases was updated
  • James Mead
    James Mead commented at 4:27 PM

    Hi Chad,

    Sorry not to get back to you sooner - I've been visiting my parents and have had long periods with no reliable internet connection. Even now I'm relyin...

Sunday, May 17 2009
46 "expects" in a mock block doesn't return an expectation, if the parameter is ... was updated
  • James Mead
    • Tag set to bug-report
    • State changed from new to open
    by James Mead at 3:03 PM

    The second form was never intended to work, because with the Hash argument version you are potentially defining expectations for multiple methods. So it's not o...

  • James Mead
    James Mead commented at 1:03 PM

    Sorry - I only just saw this - I didn't have Lighthouse notifications set up correctly. I'm going to have a look at it now.

  • James Mead
    • Assigned user set to James Mead
    by James Mead at 12:54 PM
49 Mocha is broken out right on Ruby 1.9.1 in some cases was updated
  • Chad Humphries
    • Assigned user set to James Mead
    by Chad Humphries at 1:20 PM

    I'm on ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9.7.0]. I'm using Micronaut, which does not descend from MiniUnit/Test, or Test::Unit. I use the R...

  • James Mead
    James Mead commented at 12:50 PM

    Hi Chad.

    One problem is that Mocha's acceptance tests are all based on aspects of Test::Unit which are not available in Ruby 1.9.1 - I've just had another go at...

Saturday, May 16 2009
49 Mocha is broken out right on Ruby 1.9.1 in some cases was updated
  • James Mead
    James Mead commented at 5:07 PM

    Hmm. Thanks for letting me know. I'm looking into this now. Sorry I didn't see your ticket earlier. I think I need to sort out Lighthouse notifications. Cheers,...

48 add invokes(&block) to support fakes was updated
Friday, May 15 2009
49 Mocha is broken out right on Ruby 1.9.1 in some cases was updated
  • Chad Humphries
    Chad Humphries commented at 11:30 AM

    Let me also say before it comes up that I do not wish to install the test-unit gem in 1.9.1 if at all possible. It causes issues with some of the projects I'm p...

  • Chad Humphries
    Chad Humphries created the ticket at 11:28 AM

    In particular, I have several projects which use mocha, and do not use test/unit, rspec, or bacon. On ruby 1.9.1 they all explode because:

    mocha/lib/mocha.rb:47...

Wednesday, May 13 2009
48 add invokes(&block) to support fakes was created
Monday, March 16 2009
46 "expects" in a mock block doesn't return an expectation, if the parameter is ... was created
  • jes5199
    jes5199 created the ticket at 11:29 PM

    This works:

    
    mock('Something') do
            expects( :method ).returns( :value ).at_least_once
    end
    

    but this fails:

    
    mock('Something') do
            expects(...
Friday, March 13 2009
10 [#17695] RR style proxies was updated
  • Rob Sanheim
    Rob Sanheim commented at 6:02 AM

    +1 for this. From my 5 minute glance in the source, it will not be trivial to add :).

Thursday, March 05 2009
37 Add support for Test::Unit gem v2 was updated
44 Integration with test frameworks other than Bacon may have problems in Ruby 1... was created
43 Some Bacon integration tests fails in Ruby 1.9.1 was updated
  • James Mead
    • State changed from new to resolved
    by James Mead at 4:13 PM
  • James Mead
    James Mead created the ticket at 4:04 PM
    
      1) Failure:
    test_should_fail_mocha_test_due_to_unfulfilled_expectation(BaconTest)
        [/Users/jamesmead/Code/mocha/test/acceptance/bacon_test.rb:102:in `as...
42 Bacon integration is counting ExpectationErrors as errors not failures was created