From ac2a9ddbf0b25b7fe3b3fa7f00a09e8d110bf2a2 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 5 Oct 2010 14:41:03 -0700 Subject: [PATCH] Remove HolyGrail, not worth it yet --- init.rb | 6 ------ test/integration/deliverables_edit_test.rb | 2 -- test/integration/deliverables_new_test.rb | 6 ------ test/test_helper.rb | 20 -------------------- 4 files changed, 34 deletions(-) diff --git a/init.rb b/init.rb index 81786bb..fcace09 100644 --- a/init.rb +++ b/init.rb @@ -1,11 +1,5 @@ config.gem 'formtastic', :version => '0.9.10' -if Rails.env.test? - config.gem "stackdeck" - config.gem "johnson", :version => '2.0.0.pre3' - config.gem "holygrail" -end - require 'redmine' Redmine::Plugin.register :redmine_contracts do diff --git a/test/integration/deliverables_edit_test.rb b/test/integration/deliverables_edit_test.rb index c898e8e..4082190 100644 --- a/test/integration/deliverables_edit_test.rb +++ b/test/integration/deliverables_edit_test.rb @@ -46,7 +46,6 @@ class DeliverablesEditTest < ActionController::IntegrationTest end assert_select "select#fixed_deliverable_type", :count => 0 # Not editable - assert js("jQuery('#fixed_deliverable_total_input').is(':visible')"), "Total is hidden when it should be visible" within("#deliverable-details") do fill_in "Title", :with => 'An updated title' @@ -76,7 +75,6 @@ class DeliverablesEditTest < ActionController::IntegrationTest end assert_select "select#hourly_deliverable_type", :count => 0 # Not editable - assert js("jQuery('#hourly_deliverable_total_input').is(':hidden')"), "Total is visible when it should be hidden" within("#deliverable-details") do fill_in "Title", :with => 'An updated title' diff --git a/test/integration/deliverables_new_test.rb b/test/integration/deliverables_new_test.rb index a27ed6c..a55d5f8 100644 --- a/test/integration/deliverables_new_test.rb +++ b/test/integration/deliverables_new_test.rb @@ -81,8 +81,6 @@ class DeliverablesNewTest < ActionController::IntegrationTest end fill_in "Total", :with => '1,000.00' - # TODO: webrat can't trigger DOM events so it can't appear - # assert js("jQuery('#deliverable_total').is(':visible')"), "Total is hidden when it should be visible" click_button "Save" @@ -118,10 +116,6 @@ class DeliverablesNewTest < ActionController::IntegrationTest end fill_in "Total", :with => '1,000.00' - # # Hide and clear the total - # assert js("jQuery('#deliverable_total_input').is(':hidden')"), - # "Total is visible when it should be hidden" - click_button "Save" assert_response :success diff --git a/test/test_helper.rb b/test/test_helper.rb index 74e2708..31994e1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -10,26 +10,6 @@ Webrat.configure do |config| config.mode = :rails end -require 'holygrail' - -module HolyGrail - module Extensions - # Need to rewrite the javascript for the engine too - def rewrite_script_paths(body) - body. - gsub(%r%src=("|')/?plugin_assets/redmine_contracts/javascripts/(.*)("|')%) { %|src=#{$1}%s#{$1}"| % Rails.root.join("vendor/plugins/redmine_contracts/assets/javascripts/#{$2}") }. - gsub(%r%src=("|')/?javascripts/(.*)("|')%) { %|src=#{$1}%s#{$1}"| % Rails.root.join("public/javascripts/#{$2}") } - end - end -end - -class ActionController::TestCase - include HolyGrail::Extensions -end -class ActionController::IntegrationTest - include HolyGrail::Extensions -end - def User.add_to_project(user, project, role) Member.generate!(:principal => user, :project => project, :roles => [role]) end