Commit 0a94ccb22c636c45638240c40405bf7acd6dbd1a
1 parent
1c08281c
Exists in
staging
and in
42 other branches
[Mezuro] Created test for module result helper.
Showing
1 changed file
with
15 additions
and
0 deletions
Show diff stats
plugins/mezuro/test/unit/mezuro_plugin/helpers/module_result_helper_test.rb
0 → 100644
| @@ -0,0 +1,15 @@ | @@ -0,0 +1,15 @@ | ||
| 1 | +require "test_helper" | ||
| 2 | + | ||
| 3 | +class ModuleResultHelperTest < ActiveSupport::TestCase | ||
| 4 | + | ||
| 5 | + should 'return last module name when receive a string' do | ||
| 6 | + name = 'Class' | ||
| 7 | + assert_equal name, MezuroPlugin::Helpers::ModuleResultHelper.module_name(name) | ||
| 8 | + end | ||
| 9 | + | ||
| 10 | + should 'return last module name when receive an array of strings' do | ||
| 11 | + name = ['Class', 'Module'] | ||
| 12 | + assert_equal name.last, MezuroPlugin::Helpers::ModuleResultHelper.module_name(name) | ||
| 13 | + end | ||
| 14 | + | ||
| 15 | +end |