<commit_before># ActivejobSpec

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/activejob_spec`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'activejob_spec'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install activejob_spec

## Usage

TODO: Write usage instructions here

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/activejob_spec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.


## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
<commit_msg>update README with basic description<commit_after># ActiveJobSpec

A test double of ActiveJob for RSpec.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'activejob_spec'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install activejob_spec

or

    group :test do
      gem 'activejob_spec'
    end

## Usage

Given this scenario

    Given a payment
    When I process
    Then the payment has process queued

And I write this spec using the `activejob_spec` matcher

```ruby
describe "#process" do
  before do
    ActiveJobSpec.reset!
  end

  it "adds payment.process to the Payment queue" do
    payment.process
    expect(Payment).to have_queued(payment.id, :process)
  end
end
```

And I see that the `have_queued` assertion is asserting that the `Payment` queue has a job with arguments `payment.id` and `:process`

And I take note of the `before` block that is calling `reset!` for every spec.

You can check the size of the queue in your specs too.

```ruby
describe "#process" do
  before do
    ActiveJobSpec.reset!
  end

  it "adds an entry to the Payment queue" do
    payment.process
    expect(Payment).to have_queue_size_of(1)
  end
end
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/activejob_spec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

{'fraction_non_alphanumeric': 0.0723377832971127, 'fraction_numerical': 0.0003104625892579944, 'mean_word_length': 4.026521060842434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '847239', 'n_tokens_mistral': 932, 'n_tokens_neox': 885, 'n_words': 437}