No commit activity in last 3 years
No release in over 3 years
Shoulda-style RSpec/Test Unit matchers for the Representable Gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
~> 2.14.1
 Project Readme

Representable Matchers

Build Status Code Climate Gem Version

Shoulda-style RSpec/Test Unit matchers for the Representable Gem

Installation

Add this line to your application's Gemfile:

gem 'representable_matchers'

And then execute:

$ bundle

Or install it yourself as:

$ gem install representable_matchers

Usage

it { should have_representable_property(:name) }
it { should have_representable_collection(:children) }

With submatchers

    it { should have_representable_property(:name).klass(String) }
    it { should have_representable_property(:class_and_extension).klass(Array).extends(AbstractRepresenter) }
    it { should have_representable_collection(:children).klass(Array).extends(AbstractRepresenter).parse_strategy(:sync) }

License

Authored by the Engineering Team of Coding ZEAL

Copyright (c) 2017 Zeal, LLC. Licensed under the MIT license.

Contributing

  1. Fork it
  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 new Pull Request