Commit ec0f8b0e26999fd9053e52fafdd50d671a0f7f12
Exists in
master
and in
27 other branches
Merge branch 'cc-plugin' into 'master'
cc-plugin: fix comment_classification plugin See merge request !390
Showing
3 changed files
with
14 additions
and
9 deletions
Show diff stats
lib/tasks/plugins_tests.rake
... | ... | @@ -106,7 +106,7 @@ def run_test(name, files) |
106 | 106 | files = Array(files) |
107 | 107 | plugin = filename2plugin(files.first) |
108 | 108 | if name == :cucumber || name == :selenium |
109 | - run_cucumber task2_profile(name, plugin), files | |
109 | + run_cucumber task2profile(name, plugin), files | |
110 | 110 | else |
111 | 111 | run_testrb files |
112 | 112 | end |
... | ... | @@ -134,7 +134,11 @@ end |
134 | 134 | |
135 | 135 | def run_tests(name, plugins, run=:all) |
136 | 136 | plugins = Array(plugins) |
137 | - glob = "plugins/{#{plugins.join(',')}}/test/#{task2folder(name)}/**/*.#{task2ext(name)}" | |
137 | + if name == :cucumber || name == :selenium | |
138 | + glob = "plugins/{#{plugins.join(',')}}/#{task2folder(name)}/**/*.#{task2ext(name)}" | |
139 | + else | |
140 | + glob = "plugins/{#{plugins.join(',')}}/test/#{task2folder(name)}/**/*.#{task2ext(name)}" | |
141 | + end | |
138 | 142 | files = Dir.glob(glob) |
139 | 143 | if files.empty? |
140 | 144 | 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 | ... | ... |