https://github.com/mizor/active_decorator-rspec
https://github.com/mizor/active_decorator-rspec
gem rspec ruby
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mizor/active_decorator-rspec
- Owner: mizoR
- License: mit
- Created: 2014-08-31T01:30:20.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T13:25:01.000Z (over 8 years ago)
- Last Synced: 2025-03-20T10:39:33.874Z (3 months ago)
- Topics: gem, rspec, ruby
- Language: Ruby
- Homepage: http://rubygems.org/gems/active_decorator-rspec
- Size: 23.4 KB
- Stars: 26
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ActiveDecorator::RSpec
[](http://rubygems.org/gems/active_decorator-rspec)
[](https://travis-ci.org/mizoR/active_decorator-rspec)
[](https://coveralls.io/r/mizoR/active_decorator-rspec?branch=master)
[](https://codeclimate.com/github/mizoR/active_decorator-rspec)
[](https://gemnasium.com/mizoR/active_decorator-rspec)## Installation
Add this line to your application's Gemfile:
gem 'active_decorator-rspec'
And then execute:
$ bundle
Or install it yourself as:
$ gem install active_decorator-rspec
And require it as:
```
require "active_decorator/rspec"
```## Usage
```rb
# spec/decorators/author_decorator_spec.rb
describe AuthorDecorator do
let(:author) { Author.create name: 'boo' }
subject { decorate author }its(:reverse_name) { should eq 'oob' }
end
```## Contributing
1. Fork it ( https://github.com/mizoR/active_decorator-rspec/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request