Description
To avoid confusion in the community, please note that the gem of this project is not rspec, it is r_spec (meaning Ruby Spec).
This project is totally independent of rspec.info.
Also, while both gems define an RSpec module, r_spec (which follows the gem naming convention) is still quite different than rspec due to its Ruby Fix dependency.
R Spec alternatives and similar gems
Based on the "Testing" category.
Alternatively, view R Spec alternatives based on common mentions on social networks and blogs.
-
vcr
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. -
minitest
minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. -
timecop
A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call. -
Spork
A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state. -
Konacha
Test your Rails application's JavaScript with the mocha test framework and chai assertion library -
Fabrication
DISCONTINUED. This project has moved to GitLab! Please check there for the latest updates. -
Knapsack
Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time. -
ActiveMocker
Generate mocks from ActiveRecord models for unit tests that run fast because they don’t need to load Rails or a database. -
Wrong
Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. -
RR
RR is a test double framework that features a rich selection of double techniques and a terse syntax. ⛺ -
turbo_tests
Run RSpec tests on multiple cores. Like parallel_tests but with incremental summarized output. Originally extracted from the Discourse and Rubygems source code. -
RSpecTracer
RSpec Tracer is a specs dependency analyzer, flaky tests detector, tests accelerator, and coverage reporter tool for RSpec. It maintains a list of files for each test, enabling itself to skip tests in the subsequent runs if none of the dependent files are changed. It uses Ruby's built-in coverage library to keep track of the coverage for each test.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of R Spec or a related project?
README
R Spec
A small Rspec clone based on Fix specing framework.
:warning: Important:
To avoid confusion in the community, please note that the gem of this project is not rspec, it is r_spec (meaning Ruby Spec).
This project is totally independent of rspec.info.
Also, while both gems define an RSpec
module, r_spec (which follows the gem naming convention) is still quite different than rspec due to its Ruby Fix dependency.
Contact
- Home page: https://github.com/cyril/r_spec
- Bugs/issues: https://github.com/cyril/r_spec/issues
Rubies
Terminal sessions
A comparison between the behavior of a small fix-based script (which became the r_spec
gem) and rspec
.
As a result, with r_spec
the build is passing, while with rspec it is failing. Despite two separate contexts, rspec
was not able to evaluate some code in isolation to prevent side effects.
Unbelievable but true, sometimes "💩" is equal to 42.
Although fun, this feature can be fixed pretty easily...
Installation
Add this line to your application's Gemfile:
gem 'r_spec'
And then execute:
$ bundle
Or install it yourself as:
$ gem install r_spec
Usage
Given this greeting_spec.rb
spec:
require 'r_spec'
greeting = 'Hello, world!'
RSpec.describe 'Test' do
context 'Alice' do
before { greeting.gsub!('world', 'Alice') }
it { expect(greeting).to eql 'Hello, Alice!' }
end
context 'Bob' do
before { greeting.gsub!('world', 'Bob') }
it { expect(greeting).to eql 'Hello, Bob!' }
end
end
It can be tested in the console with the command:
$ ruby greeting_spec.rb
..
Ran 2 tests in 0.010994 seconds
100% compliant - 0 infos, 0 failures, 0 errors
Security
As a basic form of security R Spec provides a set of SHA512 checksums for
every Gem release. These checksums can be found in the checksum/
directory.
Although these checksums do not prevent malicious users from tampering with a
built Gem they can be used for basic integrity verification purposes.
The checksum of a file can be checked using the sha512sum
command. For
example:
$ sha512sum pkg/r_spec-0.1.0.gem
e9e35e1953104e2d428b0f217e418db3c1baecd9e011b2545f9fcba4ff7e3bba674c6b928b3d8db842a139cd7cc9806d77ebdc7f710ece4f2aecb343703e2451 pkg/r_spec-0.1.0.gem
Versioning
R Spec follows Semantic Versioning 2.0.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
See LICENSE.md
file.
*Note that all licence references and agreements mentioned in the R Spec README section above
are relevant to that project's source code only.