new stuff
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ GIT
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
cmtool (0.0.1)
|
||||
cmtool (0.4.0)
|
||||
bourbon
|
||||
coffee-script
|
||||
devise
|
||||
|
||||
@@ -80,11 +80,11 @@ module Cmtool
|
||||
t('cmtool.action.destroy.title', model: obj.class.model_name.human)
|
||||
end
|
||||
|
||||
def create_button_text(obj)
|
||||
t('cmtool.action.create.label', model: obj.class.model_name.human)
|
||||
def create_button_text(obj = nil)
|
||||
t('cmtool.action.create.label', model: obj ? obj.class.model_name.human : '')
|
||||
end
|
||||
def update_button_text(obj)
|
||||
t('cmtool.action.update.label', model: obj.class.model_name.human)
|
||||
def update_button_text(obj = nil)
|
||||
t('cmtool.action.update.label', model: obj ? obj.class.model_name.human : '')
|
||||
end
|
||||
def link_separator
|
||||
' | '
|
||||
|
||||
@@ -103,6 +103,7 @@ module Cmtool
|
||||
end
|
||||
|
||||
def engine
|
||||
return @options[:engine] if @options[:engine].present?
|
||||
base = @options[:scope].presence
|
||||
base ||= @resource.name.split('::').first if @resource.name.index('::')
|
||||
return Rails.application unless base
|
||||
|
||||
@@ -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}
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user