No commit activity in last 3 years
No release in over 3 years
Various test helpers for Rails projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Evelpidon Test Helpers for Rails projects

Project Status Build Status

Collection of various Test::Unit / ActiveSupport::Test helpers, mainly for Rails projects.

Features

  • ActiveModel helpers
    • assert_valid
    • assert_valid_attribute
    • assert_invalid
    • assert_invalid_attribute
    • assert_valid_model_attributes
    • assert_valid_fixtures
    • assert_attribute_protected
    • assert_observer_notified
    • assert_observer_not_notified
  • ActionController helpers :
    • assert_assigns
  • Generic helpers (for example for Date/Time objects) :
    • assert_equal_date
    • assert_kind_of_boolean
  • Sunspot mocking

Installation

You can install it easy using rubygems:

gem install evelpidon_test_helpers

Or using bundler

gem 'evelpidon_test_helpers'

Usage

Test helpers get included automatically depending on the loaded gems. So if you have already required somewhere ActiveModel, then the ActiveModel related helpers will be loaded. If you have already required ActionController, ActionController helpers will be loaded, etc.

The only exception so far is the TestSunspot which to actually work you have to call it in your setup method. So for example in your test_helpers.rb :

setup do
  EvelpidonTestHelpers::TestSunspot.setup
end

TODOs

  • Generic documentation for usage
  • Specific code documentation
  • Tests (?)

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally (not really...).
  • Commit, do not mess with gemspec, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send a pull request. Bonus points for topic branches.

Author(s)

Copyright

License

Evelpidon Test Helpers are released under the MIT license. See LICENSE for more details.