Class: CollectiveIdea::Acts::NestedSet::AwesomeNestedSetTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- CollectiveIdea::Acts::NestedSet::AwesomeNestedSetTest
- Includes:
- Helper
- Defined in:
- vendor/plugins/awesome_nested_set/test/awesome_nested_set/helper_test.rb
Instance Method Summary
Methods included from Helper
Instance Method Details
- (Object) test_nested_set_options
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'vendor/plugins/awesome_nested_set/test/awesome_nested_set/helper_test.rb', line 10 def expected = [ [" Top Level", 1], ["- Child 1", 2], ['- Child 2', 3], ['-- Child 2.1', 4], ['- Child 3', 5], [" Top Level 2", 6] ] actual = (Category) do |c| "#{'-' * c.level} #{c.name}" end assert_equal expected, actual end |
- (Object) test_nested_set_options_with_mover
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'vendor/plugins/awesome_nested_set/test/awesome_nested_set/helper_test.rb', line 25 def expected = [ [" Top Level", 1], ["- Child 1", 2], ['- Child 3', 5], [" Top Level 2", 6] ] actual = (Category, categories(:child_2)) do |c| "#{'-' * c.level} #{c.name}" end assert_equal expected, actual end |