new stuff

This commit is contained in:
2012-11-25 15:41:02 +01:00
parent d4652bdf74
commit 545a2b66e6
7 changed files with 26 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
--colour --color
+1 -1
View File
@@ -19,7 +19,7 @@ GIT
PATH PATH
remote: . remote: .
specs: specs:
cmtool (0.0.1) cmtool (0.4.0)
bourbon bourbon
coffee-script coffee-script
devise devise
+4 -4
View File
@@ -80,11 +80,11 @@ module Cmtool
t('cmtool.action.destroy.title', model: obj.class.model_name.human) t('cmtool.action.destroy.title', model: obj.class.model_name.human)
end end
def create_button_text(obj) def create_button_text(obj = nil)
t('cmtool.action.create.label', model: obj.class.model_name.human) t('cmtool.action.create.label', model: obj ? obj.class.model_name.human : '')
end end
def update_button_text(obj) def update_button_text(obj = nil)
t('cmtool.action.update.label', model: obj.class.model_name.human) t('cmtool.action.update.label', model: obj ? obj.class.model_name.human : '')
end end
def link_separator def link_separator
' | ' ' | '
+1
View File
@@ -103,6 +103,7 @@ module Cmtool
end end
def engine def engine
return @options[:engine] if @options[:engine].present?
base = @options[:scope].presence base = @options[:scope].presence
base ||= @resource.name.split('::').first if @resource.name.index('::') base ||= @resource.name.split('::').first if @resource.name.index('::')
return Rails.application unless base return Rails.application unless base
+4
View File
@@ -0,0 +1,4 @@
require 'spec_helper'
# Put your acceptance spec helpers inside spec/acceptance/support
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
+6
View File
@@ -0,0 +1,6 @@
module HelperMethods
# Put helper methods you need to be available in all acceptance specs here.
end
RSpec.configuration.include HelperMethods, :type => :acceptance
+9
View File
@@ -0,0 +1,9 @@
module NavigationHelpers
# Put helper methods related to the paths in your application here.
def homepage
"/"
end
end
RSpec.configuration.include NavigationHelpers, :type => :acceptance