Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremyf/rspec-yenta
https://github.com/jeremyf/rspec-yenta
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeremyf/rspec-yenta
- Owner: jeremyf
- License: other
- Created: 2014-03-11T20:00:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-12T13:07:23.000Z (almost 11 years ago)
- Last Synced: 2024-10-14T19:43:05.067Z (3 months ago)
- Language: Ruby
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RSpec::Yenta
Yenta, find me all of my RSpec matchers.
## Installation
Add this line to your project's Gemfile:
gem 'rspec-yenta'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rspec-yenta
## Usage
In your project's Rakefile add the following:
```rake
require 'rspec/yenta'
RSpec::Yenta.load_tasks
``````sh
$ rake yenta
```If you aren't seeing some of the tasks you were expecting, try the following:
```rake
require 'rspec/yenta'
RSpec::Yenta.load_tasks do
require File.expand_path("../config/environment.rb", __FILE__)
end
````RSpec::Yenta.load_tasks` takes an arbitrary block. And the above block is
requiring the Rails application. This may also be required if you have custom
matchers that you want to expose. Or if you are working with a Rails Engine.## Sample Output
```sh
be ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers.rb:221
be_a ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers.rb:227
be_a_kind_of ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers.rb:253
be_a_new ./path/to/rspec-rails-2.14.0/lib/rspec/rails/matchers/be_a_new.rb:73
be_an ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers.rb:227
be_an_instance_of ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers.rb:240
be_close ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers/be_close.rb:4
be_equivalent_to ./path/to/rspec-expectations-2.14.4/lib/rspec/matchers/dsl.rb:8
```