diff --git a/features/support/hooks.rb b/features/support/hooks.rb
deleted file mode 100644
index ddfba55..0000000
--- a/features/support/hooks.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-Before('@mezuro') do |scenario|
- command = "#{RAILS_ROOT}/plugins/mezuro/features/monkey-server/call_monkey_server.sh \"#{scenario.name}\""
- system command
-end
diff --git a/plugins/mezuro/features/adding_metric_configuration.feature b/plugins/mezuro/features/adding_metric_configuration.feature
index 0ab3b81..dc85558 100644
--- a/plugins/mezuro/features/adding_metric_configuration.feature
+++ b/plugins/mezuro/features/adding_metric_configuration.feature
@@ -1,4 +1,3 @@
-@mezuro
Feature: Add metric configuration to a configuration
As a mezuro user
I want to add metric configurations to a Kalibro configuration
diff --git a/plugins/mezuro/features/adding_ranges.feature b/plugins/mezuro/features/adding_ranges.feature
index 7975d1a..71e55ca 100644
--- a/plugins/mezuro/features/adding_ranges.feature
+++ b/plugins/mezuro/features/adding_ranges.feature
@@ -1,4 +1,3 @@
-@mezuro
Feature: Add range to a metric configuration
As a mezuro user
I want to add ranges to a Kalibro metric configuration
diff --git a/plugins/mezuro/features/creating_configuration.feature b/plugins/mezuro/features/creating_configuration.feature
index 2d2c9b9..404eae1 100644
--- a/plugins/mezuro/features/creating_configuration.feature
+++ b/plugins/mezuro/features/creating_configuration.feature
@@ -1,4 +1,3 @@
-@mezuro
Feature: Create configuration
As a mezuro user
I want to create a Mezuro configuration
diff --git a/plugins/mezuro/features/editing_configuration.feature b/plugins/mezuro/features/editing_configuration.feature
index 21cd8e2..68b9153 100644
--- a/plugins/mezuro/features/editing_configuration.feature
+++ b/plugins/mezuro/features/editing_configuration.feature
@@ -1,4 +1,3 @@
-@mezuro
Feature: editing a configuration
As a mezuro user
I want to edit a Mezuro configuration
diff --git a/plugins/mezuro/features/monkey-server/call_monkey_server.sh b/plugins/mezuro/features/monkey-server/call_monkey_server.sh
deleted file mode 100755
index ac62788..0000000
--- a/plugins/mezuro/features/monkey-server/call_monkey_server.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-MONKEY_SERVER_ADDRESS="localhost"
-MONKEY_SERVER_PORT=50688
-
-# Ignore errors from all commands
-trap "" ERR
-
-exec 5<>/dev/tcp/$MONKEY_SERVER_ADDRESS/$MONKEY_SERVER_PORT
-echo "SCENARIO $1" >&5
-echo "SCENARIO $1"
diff --git a/plugins/mezuro/features/monkey-server/initialize_monkey_server.sh b/plugins/mezuro/features/monkey-server/initialize_monkey_server.sh
deleted file mode 100755
index aa21f1e..0000000
--- a/plugins/mezuro/features/monkey-server/initialize_monkey_server.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-cd $(dirname $0)
-cp ../../service.yml ../../regular-service.yml
-mv ../../acceptance-test.yml.example ../../service.yml
-
diff --git a/plugins/mezuro/features/monkey-server/terminate_monkey_server.sh b/plugins/mezuro/features/monkey-server/terminate_monkey_server.sh
deleted file mode 100755
index 60ea72b..0000000
--- a/plugins/mezuro/features/monkey-server/terminate_monkey_server.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-cd $(dirname $0)
-mv ../../regular-service.yml ../../service.yml
diff --git a/plugins/mezuro/features/project.feature b/plugins/mezuro/features/project.feature
index 433ed0a..bd1b49d 100644
--- a/plugins/mezuro/features/project.feature
+++ b/plugins/mezuro/features/project.feature
@@ -1,4 +1,3 @@
-@mezuro
Feature: Project
As a mezuro user
I want to create, edit and remove a Mezuro project
@@ -43,27 +42,27 @@ Feature: Project
When I follow "Edit"
# Not complete
- @selenium
- Scenario: I delete a Mezuro project that belongs to me
- Given the following Mezuro project
- | name | description | owner |
- | Sample Project | Sample Description | joaosilva |
- And I am on article "Sample Project"
- And I should be on /joaosilva/sample-project
- When I follow "Delete"
- And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog
- Then I go to /joaosilva/sample-project
- And I should see "There is no such page: /joaosilva/sample-project"
-
- @selenium
- Scenario: I cannot delete a Mezuro project that doesn't belong to me
- Given the following Mezuro project
- | name | description | owner |
- | Sample Project | Sample Description | joaosilva |
- And I am on article "Sample Project"
- And I should be on /joaosilva/sample-project
- When I follow "Delete"
- And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog
- Then I go to /joaosilva/sample-project
- And I should see "There is no such page: /joaosilva/sample-project"
+# @selenium
+# Scenario: I delete a Mezuro project that belongs to me
+# Given the following Mezuro project
+# | name | description | owner |
+# | Sample Project | Sample Description | joaosilva |
+# And I am on article "Sample Project"
+# And I should be on /joaosilva/sample-project
+# When I follow "Delete"
+# And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog
+# Then I go to /joaosilva/sample-project
+# And I should see "There is no such page: /joaosilva/sample-project"
+#
+# @selenium
+# Scenario: I cannot delete a Mezuro project that doesn't belong to me
+# Given the following Mezuro project
+# | name | description | owner |
+# | Sample Project | Sample Description | joaosilva |
+# And I am on article "Sample Project"
+# And I should be on /joaosilva/sample-project
+# When I follow "Delete"
+# And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog
+# Then I go to /joaosilva/sample-project
+# And I should see "There is no such page: /joaosilva/sample-project"
diff --git a/plugins/mezuro/features/removing_metric_configuration.feature b/plugins/mezuro/features/removing_metric_configuration.feature
index 87a58cb..9ad9f62 100644
--- a/plugins/mezuro/features/removing_metric_configuration.feature
+++ b/plugins/mezuro/features/removing_metric_configuration.feature
@@ -1,4 +1,3 @@
-@mezuro
Feature: Remove a metric configuration from a configuration
As a mezuro user
I want to remove metric configurations from a configuration
diff --git a/plugins/mezuro/test/run_acceptance_tests.sh b/plugins/mezuro/test/run_acceptance_tests.sh
old mode 100644
new mode 100755
index 622f4dd..5a929d0
--- a/plugins/mezuro/test/run_acceptance_tests.sh
+++ b/plugins/mezuro/test/run_acceptance_tests.sh
@@ -1,27 +1,42 @@
#!/bin/bash
-COMMAND_TEST = $1
+TEST_FILE=$1
+PROFILE=$2
+
+if [ -z "$PROFILE" ]; then
+ PROFILE='default'
+fi
# where are your .kalibro dir?
-KALIBRO_HOME= ~/.kalibro
+KALIBRO_HOME='/usr/share/tomcat6/.kalibro'
# create a kalibro test dir
-mkdir $KALIBRO_HOME/tests
-cp $KALIBRO_HOME/kalibro_tests.settings $KALIBRO_HOME/tests/kalibro.settings
+echo "--> Creating tests directory"
+sudo mkdir $KALIBRO_HOME/tests
+echo "--> Copying test settings"
+sudo cp $KALIBRO_HOME/kalibro_tests.settings $KALIBRO_HOME/tests/kalibro.settings
+echo "--> Changing owner of tests directory to tomcat6"
+sudo chown -R tomcat6:tomcat6 $KALIBRO_HOME/tests
# you must restart tomcat6
#if you are using a tomcat installed from apt-get, for example:
-#sudo service tomcat6 restart
+sudo service tomcat6 restart
-#if you are using a tomcat installed a specific dir, form exemplo:
+#if you are using a tomcat installed a specific dir, for exemple:
#~/tomcat6/bin/shoutdown.sh
#~/tomcat6/bin/startup.sh
# run test
-COMMAND_TEST
+cucumber $TEST_FILE -p $PROFILE
#back to normal mode
-rm -rf $KALIBRO_HOME/tests
+echo "--> Removing tests directory"
+sudo rm -rf $KALIBRO_HOME/tests
# you must restart tomcat6 again
-#sudo service tomcat6 restart
+sudo service tomcat6 restart
+
+#or some thing like that...
+#~/tomcat6/bin/shoutdown.sh
+#~/tomcat6/bin/startup.sh
+
diff --git a/plugins/mezuro/views/content_viewer/show_project.rhtml b/plugins/mezuro/views/content_viewer/show_project.rhtml
index 0214d68..89824a9 100644
--- a/plugins/mezuro/views/content_viewer/show_project.rhtml
+++ b/plugins/mezuro/views/content_viewer/show_project.rhtml
@@ -44,7 +44,7 @@
- <%= link_to "#{image_tag ('/plugins/mezuro/images/plus.png')}Add Repository", :controller => "mezuro_plugin_repository",
+ <%= link_to "#{image_tag('/plugins/mezuro/images/plus.png')}Add Repository", :controller => "mezuro_plugin_repository",
:profile => @page.profile.identifier,
:action => "new",
:id => @page.id %>
diff --git a/plugins/mezuro/views/mezuro_plugin_module_result/_module_result.rhtml b/plugins/mezuro/views/mezuro_plugin_module_result/_module_result.rhtml
index d5d3cb1..f0bf1ce 100644
--- a/plugins/mezuro/views/mezuro_plugin_module_result/_module_result.rhtml
+++ b/plugins/mezuro/views/mezuro_plugin_module_result/_module_result.rhtml
@@ -1,5 +1,5 @@
<%= render :partial => "source_tree", :locals => {:module_result => @module_result} %>
-