Giter Site home page Giter Site logo

Comments (3)

ngiger avatar ngiger commented on August 27, 2024

Under Ruby 2.0.0 it works:

Run options: --seed 53091

Running:

E

Finished in 0.108801s, 9.1911 runs/s, 9.1911 assertions/s.

  1. Error:
    TestMyClass#test_my_class:
    Test::Unit::AssertionFailedError: in mock 'classToBeMocked': Method 'will_never_be_called(*args)' called incorrect number of times
    1 matching call expected
    0 matching calls found
    The following messages have been received:
    returns_false() matched by should_receive(:returns_false).once
    .
    is not true.
    test/pry_test.rb:28:in test_my_class' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:51:inblock in assert_block'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:1437:in call' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:1437:in_wrap_assertion'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:49:in assert_block' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:82:inblock in assert'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:1442:in call' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:1442:in_wrap_assertion'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/test-unit-2.5.5/lib/test/unit/assertions.rb:64:in assert' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/test_unit_integration.rb:53:inmake_assertion'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/validators.rb:60:in block in validate_count' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation.rb:414:inflexmock_location_filter'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/validators.rb:59:in validate_count' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/validators.rb:78:invalidate'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation.rb:141:in block in flexmock_verify' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation.rb:140:ineach'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation.rb:140:in flexmock_verify' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation_director.rb:65:inblock in flexmock_verify'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation_director.rb:64:in each' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/expectation_director.rb:64:inflexmock_verify'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/core.rb:86:in block (2 levels) in flexmock_verify' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/core.rb:85:ineach'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/core.rb:85:in block in flexmock_verify' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/core.rb:266:inflexmock_wrap'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/core.rb:84:in flexmock_verify' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/mock_container.rb:40:inblock in flexmock_verify'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/mock_container.rb:39:in each' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/mock_container.rb:39:inflexmock_verify'
    /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/mock_container.rb:32:in flexmock_teardown' /home/niklaus/.rvm/gems/ruby-2.0.0-p247/gems/flexmock-1.3.2/lib/flexmock/test_unit_integration.rb:39:inteardown'
    1 runs, 1 assertions, 0 failures, 1 errors, 0 skips

from flexmock.

doudou avatar doudou commented on August 27, 2024

More information about that one: minitest 5 requires everything that includes MiniTest::Assertions to provide an "assertions" accessor. See minitest/minitest#286

from flexmock.

doudou avatar doudou commented on August 27, 2024

A word: I'm trying to take over the maintenance of flexmock. It's unfortunately bit-rotting since Jim's passing, and that's really a pity - both for his memory as a great contributor to Ruby's community and as a really nice piece of software.

I've fixed that particular issue, as well as added minitest-specific support and some other things
there: https://github.com/doudou/flexmock. I'm going to try and get the rights to push new gems versions, but I really don't know if it's going to happen.

from flexmock.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.