Commit 7750bb37d186eba4f307675096600cf23ee214aa
1 parent
debcfb2a
Exists in
master
and in
21 other branches
fix comment_classification plugin
Showing
4 changed files
with
13 additions
and
10 deletions
Show diff stats
lib/tasks/plugins_tests.rake
| ... | ... | @@ -108,7 +108,7 @@ def run_test(name, files) |
| 108 | 108 | files = Array(files) |
| 109 | 109 | plugin = filename2plugin(files.first) |
| 110 | 110 | if name == :cucumber || name == :selenium |
| 111 | - run_cucumber task2_profile(name, plugin), files | |
| 111 | + run_cucumber task2profile(name, plugin), files | |
| 112 | 112 | else |
| 113 | 113 | run_testrb files |
| 114 | 114 | end |
| ... | ... | @@ -136,7 +136,11 @@ end |
| 136 | 136 | |
| 137 | 137 | def run_tests(name, plugins, run=:all) |
| 138 | 138 | plugins = Array(plugins) |
| 139 | + if name == :cucumber || name == :selenium | |
| 140 | + glob = "plugins/{#{plugins.join(',')}}/#{task2folder(name)}/**/*.#{task2ext(name)}" | |
| 141 | + else | |
| 139 | 142 | glob = "plugins/{#{plugins.join(',')}}/test/#{task2folder(name)}/**/*.#{task2ext(name)}" |
| 143 | + end | |
| 140 | 144 | files = Dir.glob(glob) |
| 141 | 145 | if files.empty? |
| 142 | 146 | 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