diff options
| author | realtradam <[email protected]> | 2021-07-09 17:12:17 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-07-09 17:12:17 -0400 |
| commit | a90b0717db0b4accbaacb6ac9d7faa4670b53a75 (patch) | |
| tree | 0455bc97398330a740dd59587a74dc1e3fc898ff /spec/component_manager_spec.rb | |
| parent | 7f38d21cb983e909c89ae04355a6e24cd381505e (diff) | |
| download | FelECS-1.0.1.tar.gz FelECS-1.0.1.zip | |
fixed attrs overwriting methods1.0.1
Diffstat (limited to 'spec/component_manager_spec.rb')
| -rw-r--r-- | spec/component_manager_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/component_manager_spec.rb b/spec/component_manager_spec.rb index 1c732ac..d99d744 100644 --- a/spec/component_manager_spec.rb +++ b/spec/component_manager_spec.rb @@ -84,6 +84,15 @@ describe 'Components' do end it 'cant overwrite exiting component managers' do - expect { FelFlame::Components.new('TestComponents') }.to raise_error(NameError) + FelFlame::Components.new('TestComponent1') + expect { FelFlame::Components.new('TestComponent1') }.to raise_error(NameError) + end + + it 'can\'t create an attribute when its name is an existing method' do + expect { FelFlame::Components.new('TestComponent2', :id) }.to raise_error(NameError) + expect { FelFlame::Components.new('TestComponent2', :addition_triggers) }.to raise_error(NameError) + expect { FelFlame::Components.new('TestComponent2', :removal_triggers) }.to raise_error(NameError) + expect { FelFlame::Components.new('TestComponent2', :attr_triggers) }.to raise_error(NameError) + expect { FelFlame::Components.new('TestComponent3', :same, :same) }.to raise_error(NameError) end end |
