search for: publish_articles

Displaying 2 results from an estimated 2 matches for "publish_articles".

Did you mean: published_articles
2006 Mar 26
0
Another test problem
I hope there''s not a typo this time ;-) With self.use_instantiated_fixtures = false in test_helper.rb (default since 1.0 version) I want on demand instances. This @publish_articles[''article_linux''] return a Fixture object (breakpointed, I see the data of fixture fields). So I assume that publish_articles is well populated with fixture datas This assert_equal publish_articles(:article_linux).title, @article.title produce an error because publish_articles(:...
2006 Mar 26
4
A unit test that should pass
Hi, I wonder why this unit test fails. The model : class Article < ActiveRecord::Base set_table_name "publish_articles" belongs_to :category validates_presence_of :title, :excerpt #snip end The test : def test_validate @article.title = nil @article.excerpt = nil assert !@article.save assert_equal 2, !@article.errors.count end !@article.errors.count returns ''false'' ins...