Remove HolyGrail, not worth it yet

This commit is contained in:
Eric Davis
2010-10-05 14:41:03 -07:00
parent 67469c9d94
commit ac2a9ddbf0
4 changed files with 0 additions and 34 deletions
-6
View File
@@ -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
@@ -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'
@@ -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
-20
View File
@@ -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