Class: ActionsTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



4
5
6
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb', line 4

def setup
  @actions = ActiveScaffold::DataStructures::Actions.new(:a, 'b')
end

#test_addObject



20
21
22
23
24
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb', line 20

def test_add
  assert !@actions.include?(:c)
  @actions.add 'c'
  assert @actions.include?('c')
end

#test_excludeObject



14
15
16
17
18
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb', line 14

def test_exclude
  assert @actions.include?('b')
  @actions.exclude :b
  assert !@actions.include?(:b)
end

#test_initializationObject



8
9
10
11
12
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb', line 8

def test_initialization
  assert @actions.include?('a')
  assert @actions.include?(:b)
  assert !@actions.include?(:c)
end