3/3/2023 0 Comments Ttr beancounter![]() The location of beanstalkd servers by checking for configuration in a fewĭifferent places, though in some cases special configuration may be required.įirst, and of higest precedence, BeanCounter will checkĮNV for a comma separated list of beanstalkd ![]() ![]() By default, BeanCounter will try to intelligently determine # To make the BeanCounter matchers available to all specs, require # bean_counter/spec in spec/spec_helper.rb: require 'bean_counter/spec' # To maintain more control over where the matchers are available, require # bean_counter/spec_matchers directly and include BeanCounter::SpecMatchers in # any spec where you want to use the matchers: # spec/spec_helper.rb require 'bean_counter/spec_matchers' # Then include BeanCounter::SpecMatchers in any test class that needs access to the # matchers: # spec/beaneater_client_spec.rb require 'spec_helper' describe BeaneaterClient do include BeanCounter:: SpecMatchers # matchers will be available to all test cases inside this block end General Configurationīeyond the configuration required to utilize BeanCounter with your testįramework, BeanCounter may also require other test framework agnosticĬonfiguration to work properly or as desired.īeanCounter.beanstalkd_url allows you to directly provide a string or anĪrray of strings that will be used by BeanCounter when communicating with theīeanstalkd pool. In order to use BeanCounter in your specs you'll need to require and configure # To make the assertions available to all test cases you can require one of the # following in test/test_helper.rb: # For TestUnit, adds assertions to Test::Unit::TestCase and any derived classes: require 'bean_counter/test_unit' # For MiniTest, adds assertions to MiniTest::Unit::TestCase and any derived classes: require 'bean_counter/mini_test' # To maintain greater control over where the assertions are available, require # bean_counter/test_assertions directly then include BeanCounter::TestAssertions # in any test classes where you want to make use of the assertions: # test/test_helper.rb require 'bean_counter/test_assertions' # test/beaneater_test.rb require 'test_helper' # For TestUnit: class BeaneaterTest < Test:: Unit:: TestCase include BeanCounter:: TestAssertions # assertions will be available to all tests in this class end # Or for MiniTest: class BeaneaterTest < MiniTest:: Unit:: TestCase include BeanCounter:: TestAssertions # assertions will be available to all tests in this class end RSpec InstallationĪdd this line to your application's Gemfile: The entire beanstalkd pool by deleting the appropriate jobs. have_tube - Searches all tubes in the beanstalkd pool.If called on a block only inspects jobs enqueued during the execution of Pool with attributes matching the keys/values of the Hash given. have_enqueued - Searches for jobs in the beanstalkd.RSpec Matchersįor RSpec, BeanCounter provides 2 equivalent should/should_not matchers for use in your specs: assert_tube/refute_tube - Searches all tubes in the beanstalkd poolįor a tube with attributes matching the keys/values of a given HashīeanCounter also provides a helper, BeanCounter.reset! to reset a given tube or.With attributes matching the keys/values of the Hash given assert_enqueues/refute_enqueues - Searches only those jobs in theīeanstalkd pool enqueued during the execution of the provided block for jobs. ![]() Pool for jobs with attributes matching the keys/values of the Hash given
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |