Test your application better
Add this line to your application's Gemfile:
gem 'testable', group: [:development, :test], require: false
into your my_gem.gemspec, when building gem:
s.add_development_dependency 'tuberack'
Or install it yourself as:
gem install tuberack
After that install TubeRack into your application
rails g tuberack:install
- Uncomment and change engine name in
test/test_help.rb
if are you building gem - Change name of your app in
.simplecov
or remove everything inside block
Now you are able to test your application with
- MiniTest Spec
- Cucumber
- SimpleCov
- Shoulda
- Mocha
- FactoryGirl
- LetterOpener
- Cell tests
You can easily set current user with user ability with cell. Just load it in your view and point current user instance
= render_cell 'tuberack/switcher', :show, current_user