Sha256: d5c781ba246501c2cd8704696605053caffa870dfb46eab34c755d3428208572
Contents?: true
Size: 841 Bytes
Versions: 1
Compression:
Stored size: 841 Bytes
Contents
require File.join(File.dirname(__FILE__), 'test_helper') class ActsAsJoinableTest < ActiveSupport::TestCase context "ActsAsJoinable" do setup do create_models(1, 2) end should "have 1 of each post, asset, tag to start" do assert_equal 1, Post.count assert_equal 2, Tag.count assert_equal 2, Asset.count end context "correct generated methods" do setup do @post = Post.first @asset = Asset.first @tag = Tag.first end should "Post should respond_to?(:tags) and respond_to?(:assets)" do puts @post.tags.inspect + " !!" assert @post.respond_to?(:tags) assert @post.respond_to?(:assets) end end teardown do Post.detonate Tag.detonate Asset.detonate end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts-as-joinable-0.0.1.5 | test/test_acts_as_joinable.rb |