Class: TreeTestWithoutOrder
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TreeTestWithoutOrder
- Defined in:
- lib/plugins/acts_as_tree/test/acts_as_tree_test.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
204 205 206 207 208 |
# File 'lib/plugins/acts_as_tree/test/acts_as_tree_test.rb', line 204 def setup setup_db @root1 = TreeMixinWithoutOrder.create! @root2 = TreeMixinWithoutOrder.create! end |
#teardown ⇒ Object
210 211 212 |
# File 'lib/plugins/acts_as_tree/test/acts_as_tree_test.rb', line 210 def teardown teardown_db end |
#test_root ⇒ Object
214 215 216 |
# File 'lib/plugins/acts_as_tree/test/acts_as_tree_test.rb', line 214 def test_root assert [@root1, @root2].include?(TreeMixinWithoutOrder.root) end |
#test_roots ⇒ Object
218 219 220 |
# File 'lib/plugins/acts_as_tree/test/acts_as_tree_test.rb', line 218 def test_roots assert_equal [], [@root1, @root2] - TreeMixinWithoutOrder.roots end |