Commit 9f4717ef481fa3ca2fa4ef614384a943dd1c29ab
Exists in
master
and in
27 other branches
Merge branch 'cc-plugin' of https://gitlab.com/juniorsilva1001/noosfero into cc-plugin
Showing
4 changed files
with
13 additions
and
10 deletions
Show diff stats
lib/tasks/plugins_tests.rake
| ... | ... | @@ -105,7 +105,7 @@ def run_test(name, files) |
| 105 | 105 | files = Array(files) |
| 106 | 106 | plugin = filename2plugin(files.first) |
| 107 | 107 | if name == :cucumber || name == :selenium |
| 108 | - run_cucumber task2_profile(name, plugin), files | |
| 108 | + run_cucumber task2profile(name, plugin), files | |
| 109 | 109 | else |
| 110 | 110 | run_testrb files |
| 111 | 111 | end |
| ... | ... | @@ -133,7 +133,11 @@ end |
| 133 | 133 | |
| 134 | 134 | def run_tests(name, plugins, run=:all) |
| 135 | 135 | plugins = Array(plugins) |
| 136 | + if name == :cucumber || name == :selenium | |
| 137 | + glob = "plugins/{#{plugins.join(',')}}/#{task2folder(name)}/**/*.#{task2ext(name)}" | |
| 138 | + else | |
| 136 | 139 | glob = "plugins/{#{plugins.join(',')}}/test/#{task2folder(name)}/**/*.#{task2ext(name)}" |
| 140 | + end | |
| 137 | 141 | files = Dir.glob(glob) |
| 138 | 142 | if files.empty? |
| 139 | 143 | puts "I: no tests to run #{name}" | ... | ... |
plugins/comment_classification/features/step_definitions/plugin_steps.rb
| 1 | 1 | Given /^CommentClassificationPlugin is enabled$/ do |
| 2 | - step %{I am logged in as admin} | |
| 3 | - step %{I am on the environment control panel} | |
| 4 | - step %{I follow "Plugins"} | |
| 5 | - step %{I check "Comment Classification"} | |
| 6 | - step %{I press "Save changes"} | |
| 2 | + steps %Q{ | |
| 3 | + Given I am logged in as admin | |
| 4 | + Given I am on the environment control panel | |
| 5 | + Given I follow "Plugins" | |
| 6 | + Given I check "Comment Classification" | |
| 7 | + Given I press "Save changes" | |
| 8 | + } | |
| 9 | + | |
| 7 | 10 | Environment.default.enabled_plugins.should include("CommentClassificationPlugin") |
| 8 | 11 | end |
| 9 | 12 | ... | ... |
plugins/comment_classification/lib/comment_classification_plugin.rb