Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nigelramsay/test_fixtures
Rails plugin to validate test fixtures
https://github.com/nigelramsay/test_fixtures
Last synced: about 2 months ago
JSON representation
Rails plugin to validate test fixtures
- Host: GitHub
- URL: https://github.com/nigelramsay/test_fixtures
- Owner: nigelramsay
- License: mit
- Created: 2008-07-30T18:21:20.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2008-07-30T20:43:34.000Z (over 16 years ago)
- Last Synced: 2023-04-11T17:06:10.543Z (over 1 year ago)
- Language: Ruby
- Homepage: http://www.abletech.co.nz/blog
- Size: 78.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: MIT-LICENSE
Awesome Lists containing this project
README
TestFixtures
============Adds a unit test called "fixtures_test" which confirms each of your fixtures are valid.
Just run:
rake test:units
or
ruby test/units/fixtures_test.rbExample Output
==============If your test fails, you will get an error message such as:
$ ruby test/unit/fixtures_test.rb
Loaded suite test/unit/fixtures_test
Started
F
Finished in 0.503429 seconds.1) Failure:
test_fixtures(FixturesTest)
[test/unit/fixtures_test.rb:35:in `assert_valid'
test/unit/fixtures_test.rb:34:in `assert_valid'
test/unit/fixtures_test.rb:11:in `test_fixtures'
test/unit/fixtures_test.rb:10:in `each'
test/unit/fixtures_test.rb:10:in `test_fixtures'
test/unit/fixtures_test.rb:7:in `each'
test/unit/fixtures_test.rb:7:in `test_fixtures'
/Users/nigelramsay/projects/sharesight/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:33:in `__send__'
/Users/nigelramsay/projects/sharesight/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:33:in `run']:
Region[408794758] is not valid:
Label is too short (minimum is 3 characters)
Label can't be blank.
is not true.1 tests, 36 assertions, 1 failures, 0 errors
Installation instructions
=========================To install, run this:
script/plugin install git://github.com/nigelramsay/test_fixtures.gitTo uninstall, run this:
script/plugin remove test_fixturesCredits
=======Much of the code is from an rspec test case. I found it somewhere out there on the internet, but I can't remember where. Credit goes to that guy. I just tweaked it to remove the rspec dependency, and enhanced the failure reporting.
Copyright (c) 2008 Able Technology Limited, released under the MIT license