A collection of Rspec matchers to share across TFG projects.
Add this line to your application's Gemfile:
gem 'thefrontiergroup-matchers', git: 'git@github.com:thefrontiergroup/thefrontiergroup-matchers.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install thefrontiergroup-matchers
it { is_expected.to set_flash(:notice) }
it { is_expected.to set_flash(:alert).to('foobar') }
it { is_expected.not_to set_flash(:notice).to(/not/) }
Pagination (based on gem kaminari)
specify { expect(users).to be_paginated }
it { is_expected.to order(archived_user).after(unarchived_user) }
it { is_expected.to be_bad_request }
it { is_expected.to be_forbidden }
it { is_expected.to be_not_found }
it { is_expected.to be_unauthorised }
it { is_expected.to be_unprocessable_entity }
it { is_expected.to be_internal_server_error }
- Fork it ( https://github.com/[my-github-username]/thefrontiergroup-matchers/fork )
- 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