A summary of data about the Ruby ecosystem.

https://github.com/rspec/rspec

The RSpec monorepo
https://github.com/rspec/rspec

Keywords from Contributors

rspec activerecord activejob mvc rubygems rack rubocop code-formatter static-code-analysis sinatra

Last synced: about 4 hours ago
JSON representation

Repository metadata

The RSpec monorepo

README.md

rspec Build Status

This is the RSpec mono repo, it contains the core gems we think of as "rspec", they are:

  • rspec-core provides the structure for writing executable examples of how your
    code should behave, and an rspec command with tools to constrain which
    examples get run and tailor the output.

  • rspec-expectations lets you express expected outcomes on an object in an example.

  • rspec-mocks is a test-double framework for rspec with support for method stubs,
    fakes, and message expectations on generated test-doubles and real objects
    alike.

  • rspec-support provides shared helper functionality for the other three gems, in
    general you don't install this on its own.

Install

gem install rspec              # for rspec-core, rspec-expectations and rspec-mocks
gem install rspec-core         # for rspec-core only
gem install rspec-expectations # for rspec-expectations only
gem install rspec-mocks        # for rspec-mocks only

Want to run against the main branch? You'll need to include the dependent
RSpec repos as well. Add the following to your Gemfile:

%w[rspec rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
  if lib == 'rspec'
    gem lib, git: "https://github.com/rspec/rspec"
  else
    gem lib, git: "https://github.com/rspec/rspec", glob: "#{lib}/#{lib}.gemspec"
  end
end

The rspec Command

If you install the rspec-core gem, it installs the rspec executable,
which you'll use to run rspec. The rspec command comes with many useful
options.

Run rspec --help to see the complete list.

Getting started:

RSpec uses the words "describe" and "it" so we can express concepts like a conversation:

"Describe a calculator."
"It adds together numbers."

e.g.

# in spec/calculator_spec.rb
RSpec.describe Calculator do
  describe '#add' do
    it 'returns the sum of its arguments' do
      expect(Calculator.new.add(1, 2)).to eq(3)
    end
  end
end

Run this with the rspec command, and watch it fail:

$ rspec spec/calculator_spec.rb
./spec/calculator_spec.rb:1: uninitialized constant Calculator

Address the failure by defining a skeleton of the Calculator class:

# in lib/calculator.rb
class Calculator
  def add(a, b)
  end
end

Be sure to require the implementation file in the spec:

# in spec/calculator_spec.rb
# - RSpec adds ./lib to the $LOAD_PATH
require "calculator"

Now run the spec again, and watch the expectation fail:

$ rspec spec/calculator_spec.rb
F

Failures:

  1) Calculator#add returns the sum of its arguments
     Failure/Error: expect(Calculator.new.add(1, 2)).to eq(3)

       expected: 3
            got: nil

       (compared using ==)
     # ./spec/calculator_spec.rb:6:in `block (3 levels) in <top (required)>'

Finished in 0.00131 seconds (files took 0.10968 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/calculator_spec.rb:5 # Calculator#add returns the sum of its arguments

Implement the simplest solution, by changing the definition of Calculator#add to:

def add(a, b)
  a + b
end

Now run the spec again, and watch it pass:

$ rspec spec/calculator_spec.rb
.

Finished in 0.000315 seconds
1 example, 0 failures

Use the documentation formatter to see the resulting spec:

$ rspec spec/calculator_spec.rb --format doc
Calculator
  #add
    returns the sum of its arguments

Finished in 0.000379 seconds
1 example, 0 failures

Contributing

Once you've set up the environment, you'll need to cd into the working
directory of whichever repo you want to work in. From there you can run the
specs and cucumber features, and make patches.

Also see


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 10,459
Total Committers: 652
Avg Commits per committer: 16.041
Development Distribution Score (DDS): 0.728

Commits in past year: 203
Committers in past year: 15
Avg Commits per committer in past year: 13.533
Development Distribution Score (DDS) in past year: 0.291

Name Email Commits
Myron Marston m****n@g****m 2841
David Chelimsky d****y@g****m 2399
Jon Rowe h****o@j****k 2190
Sam Phippen s****n@g****m 308
Andy Lindeman a****n@g****m 144
Chad Humphries c****d@s****m 126
Xavier Shay x****r@r****t 124
Justin Ko j****0@g****m 121
Yuji Nakayama n****j@g****m 107
Phil Pirozhkov h****o@f****u 102
Benoit Tigeot b****t@h****m 95
Aaron Kromer a****r@g****m 72
Bradley Schaefer b****r@g****m 63
Eric Mueller n****a@g****m 50
lucapette l****e@g****m 25
Sidu Ponnappa c****a@g****m 21
Pete Higgins p****e@p****g 19
Charlie Maffitt c****t@h****m 18
Greggory Rothmeier g****g@h****m 18
Olle Jonsson o****n@g****m 18
Marc-Andre Lafortune g****b@m****a 17
Pritesh Jain p****6@g****m 16
ydah 1****h 16
Michi Huber m****r@g****m 16
Benjamin Fleischer g****b@b****m 15
Joe Ferris j****s@t****m 15
Baden Ashford b****d@g****m 14
Peter Goldstein p****n@g****m 14
sleepingkingstudios m****n@s****m 14
Pat Allan p****t@f****m 13
and 622 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 15 hours ago

Total issues: 133
Total pull requests: 135
Average time to close issues: 3 months
Average time to close pull requests: 23 days
Total issue authors: 113
Total pull request authors: 19
Average comments per issue: 5.54
Average comments per pull request: 0.79
Merged pull request: 55
Bot issues: 0
Bot pull requests: 0

Past year issues: 39
Past year pull requests: 75
Past year average time to close issues: 18 days
Past year average time to close pull requests: 10 days
Past year issue authors: 35
Past year pull request authors: 16
Past year average comments per issue: 1.08
Past year average comments per pull request: 1.05
Past year merged pull request: 47
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/rspec/rspec

Top Issue Authors

  • myronmarston (11)
  • mtasaka (4)
  • pirj (3)
  • jrmhaig (2)
  • JonRowe (2)
  • benoittgt (2)
  • maxlinc (2)
  • xaviershay (2)
  • HoneyryderChuck (1)
  • bannable (1)
  • swiknaba (1)
  • sorah (1)
  • cconstantine (1)
  • maxmeyer (1)
  • Lukom (1)

Top Pull Request Authors

  • JonRowe (90)
  • pirj (12)
  • benoittgt (5)
  • jrmhaig (4)
  • bquorning (3)
  • byroot (3)
  • AnthonyClark (3)
  • MaxLap (2)
  • viralpraxis (2)
  • neilvcarvalho (2)
  • lekemula (1)
  • dguardado (1)
  • pinzonjulian (1)
  • mopp (1)
  • tom-lord (1)

Top Issue Labels

  • Feature (11)
  • documentation (3)
  • bug (3)
  • good first issue (1)
  • 3-99 (1)

Top Pull Request Labels

  • 3-99 (7)
  • 4-0 (7)
  • rspec-expectations (2)
  • rspec-core (2)
  • rspec-mocks (1)

Package metadata

gem.coop: rspec-expectations

rspec-expectations provides a simple, readable API to express expected outcomes of a code example.

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-expectations/
  • Licenses: MIT
  • Latest release: 3.13.5 (published 7 months ago)
  • Last Synced: 2025-12-09T06:03:29.639Z (1 day ago)
  • Versions: 125
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,088,599,978 Total
  • Docker Downloads: 3,793,730,932
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.003%
    • Downloads: 0.009%
  • Maintainers (1)
gem.coop: rspec-core

BDD for Ruby. RSpec runner and example groups.

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-core/
  • Licenses: MIT
  • Latest release: 3.13.6 (published about 2 months ago)
  • Last Synced: 2025-12-09T08:28:04.150Z (about 22 hours ago)
  • Versions: 148
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,087,429,286 Total
  • Docker Downloads: 3,793,561,496
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.003%
    • Downloads: 0.009%
  • Maintainers (1)
gem.coop: rspec-support

Support utilities for RSpec gems

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-support/
  • Licenses: MIT
  • Latest release: 3.13.6 (published 3 months ago)
  • Last Synced: 2025-12-09T01:30:19.959Z (1 day ago)
  • Versions: 51
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,072,076,346 Total
  • Docker Downloads: 3,734,949,580
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.004%
    • Downloads: 0.011%
  • Maintainers (1)
gem.coop: rspec-mocks

RSpec's 'test double' framework, with support for stubbing and mocking

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-mocks/
  • Licenses: MIT
  • Latest release: 3.13.7 (published about 1 month ago)
  • Last Synced: 2025-12-09T10:07:30.471Z (about 21 hours ago)
  • Versions: 133
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,081,787,428 Total
  • Docker Downloads: 3,793,351,416
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.005%
    • Downloads: 0.01%
    • Docker downloads count: 0.011%
  • Maintainers (1)
gem.coop: rspec

BDD for Ruby

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec/
  • Licenses: MIT
  • Latest release: 3.13.2 (published about 2 months ago)
  • Last Synced: 2025-12-09T16:02:11.640Z (about 15 hours ago)
  • Versions: 172
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 934,752,506 Total
  • Docker Downloads: 3,793,327,908
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.006%
    • Docker downloads count: 0.012%
    • Downloads: 0.014%
  • Maintainers (1)
rubygems.org: rspec

BDD for Ruby

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec/
  • Licenses: MIT
  • Latest release: 3.13.2 (published about 2 months ago)
  • Last Synced: 2025-12-08T12:33:03.321Z (2 days ago)
  • Versions: 172
  • Dependent Packages: 60,331
  • Dependent Repositories: 350,079
  • Downloads: 934,352,316 Total
  • Docker Downloads: 3,793,327,908
  • Rankings:
    • Dependent packages count: 0.001%
    • Downloads: 0.012%
    • Dependent repos count: 0.057%
    • Docker downloads count: 0.059%
    • Average: 0.425%
    • Stargazers count: 0.685%
    • Forks count: 1.736%
  • Maintainers (4)
rubygems.org: rspec-core

BDD for Ruby. RSpec runner and example groups.

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-core/
  • Licenses: MIT
  • Latest release: 3.13.6 (published about 2 months ago)
  • Last Synced: 2025-12-09T23:31:12.320Z (about 7 hours ago)
  • Versions: 148
  • Dependent Packages: 645
  • Dependent Repositories: 397,977
  • Downloads: 1,087,767,390 Total
  • Docker Downloads: 3,793,561,496
  • Rankings:
    • Downloads: 0.005%
    • Dependent repos count: 0.047%
    • Docker downloads count: 0.056%
    • Dependent packages count: 0.071%
    • Average: 0.459%
    • Forks count: 0.825%
    • Stargazers count: 1.751%
  • Maintainers (1)
rubygems.org: rspec-expectations

rspec-expectations provides a simple, readable API to express expected outcomes of a code example.

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-expectations/
  • Licenses: MIT
  • Latest release: 3.13.5 (published 7 months ago)
  • Last Synced: 2025-12-08T16:31:33.683Z (1 day ago)
  • Versions: 125
  • Dependent Packages: 578
  • Dependent Repositories: 398,836
  • Downloads: 1,088,363,203 Total
  • Docker Downloads: 3,793,730,932
  • Rankings:
    • Downloads: 0.004%
    • Dependent repos count: 0.046%
    • Docker downloads count: 0.056%
    • Dependent packages count: 0.079%
    • Average: 0.547%
    • Forks count: 1.363%
    • Stargazers count: 1.731%
  • Maintainers (1)
rubygems.org: rspec-mocks

RSpec's 'test double' framework, with support for stubbing and mocking

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-mocks/
  • Licenses: MIT
  • Latest release: 3.13.7 (published about 1 month ago)
  • Last Synced: 2025-12-09T03:31:46.400Z (1 day ago)
  • Versions: 133
  • Dependent Packages: 718
  • Dependent Repositories: 397,261
  • Downloads: 1,081,683,064 Total
  • Docker Downloads: 3,793,351,416
  • Rankings:
    • Downloads: 0.006%
    • Dependent repos count: 0.047%
    • Docker downloads count: 0.057%
    • Dependent packages count: 0.064%
    • Average: 0.575%
    • Forks count: 1.475%
    • Stargazers count: 1.8%
  • Maintainers (4)
rubygems.org: rspec-support

Support utilities for RSpec gems

  • Homepage: https://rspec.info
  • Documentation: http://www.rubydoc.info/gems/rspec-support/
  • Licenses: MIT
  • Latest release: 3.13.6 (published 3 months ago)
  • Last Synced: 2025-12-08T19:02:58.462Z (1 day ago)
  • Versions: 51
  • Dependent Packages: 36
  • Dependent Repositories: 262,654
  • Downloads: 1,071,952,747 Total
  • Docker Downloads: 3,734,949,580
  • Rankings:
    • Downloads: 0.007%
    • Docker downloads count: 0.057%
    • Dependent repos count: 0.089%
    • Dependent packages count: 0.685%
    • Average: 1.564%
    • Forks count: 2.661%
    • Stargazers count: 5.884%
  • Maintainers (1)
proxy.golang.org: github.com/rspec/rspec

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/rspec/rspec#section-documentation
  • Licenses: mit
  • Latest release: v3.13.4+incompatible (published 7 months ago)
  • Last Synced: 2025-12-08T02:01:34.926Z (2 days ago)
  • Versions: 34
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 1.273%
    • Forks count: 1.795%
    • Average: 5.861%
    • Dependent packages count: 9.576%
    • Dependent repos count: 10.802%
gem.coop: sspec

BDD for Ruby

  • Homepage: http://github.com/rspec
  • Documentation: http://www.rubydoc.info/gems/sspec/
  • Licenses: MIT
  • Latest release: 3.8.0 (published over 6 years ago)
  • Last Synced: 2025-12-08T02:01:31.312Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,130 Total
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 31.234%
    • Downloads: 93.703%
  • Maintainers (1)
rubygems.org: sspec

BDD for Ruby

  • Homepage: http://github.com/rspec
  • Documentation: http://www.rubydoc.info/gems/sspec/
  • Licenses: MIT
  • Latest release: 3.8.0 (published over 6 years ago)
  • Last Synced: 2025-12-08T02:01:31.423Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,130 Total
  • Rankings:
    • Dependent packages count: 15.706%
    • Dependent repos count: 46.782%
    • Average: 52.909%
    • Downloads: 96.239%
  • Maintainers (1)

Dependencies

.github/workflows/ci.yml actions
.github/workflows/documentation_coverage.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
.github/workflows/rspec.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
.github/workflows/rubocop.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems
  • github-markup >= 0 development
  • redcarpet >= 0 development
  • simplecov >= 0 development
  • webrick ~> 1.9.1 development
  • yard ~> 0.9.24 development
  • aruba >= 1.1.0, < 3.0.0
  • coderay >= 0
  • flexmock ~> 0.9.0
  • jruby-openssl >= 0
  • minitest ~> 5.12.0
  • mocha ~> 0.13.0
  • rake >= 13.0.0
  • rr ~> 1.0.4
  • test-unit ~> 3.0
  • thread_order ~> 1.1.0
rspec/rspec.gemspec rubygems
rspec-core/rspec-core.gemspec rubygems
rspec-expectations/rspec-expectations.gemspec rubygems
  • diff-lcs >= 1.6.0, < 2.0
rspec-mocks/rspec-mocks.gemspec rubygems
  • diff-lcs >= 1.6.0, < 2.0
rspec-support/rspec-support.gemspec rubygems

Score: 36.51109144044145