flexmock
flexmock copied to clipboard
Flexible mocking for Ruby testing
These patches have been written by Mamoru TASAKA of the Fedora project: https://src.fedoraproject.org/rpms/rubygem-flexmock/tree/rawhide They fix various issues with Ruby 3.0.
With version 2.3.5, using the following: ```ruby flexmock(collection).should_receive(:each_batch).and_iterates(%w[a b c], %[d e f]) collection.each_batch.each_with_index do |batch, index| ... end ``` Produces the following exception: > FlexMock::MockError: No Block given to...
flexmock calls `singleton_class` which is not defined.
ruby 3.4.7 minitest 5.26.1 rake 13.3.1 simplecov 0.22.0 ``` ** Invoke test (first_time) ** Execute test Run options: --seed 47144 # Running: ......................................./build/ruby-flexmock/src/flexmock/lib/flexmock/spy_describers.rb:36: warning: literal string will be frozen in...