Implemented Rubocop
- just took a stab at running the StringLiterals cop to get a taste.
This commit is contained in:
parent
e996868033
commit
03d6e6c990
80 changed files with 510 additions and 477 deletions
|
@ -5,20 +5,20 @@ Before do
|
|||
end
|
||||
|
||||
Given /^app "([^\"]*)" is using config "([^\"]*)"$/ do |path, config_name|
|
||||
target = File.join(PROJECT_ROOT_PATH, "fixtures", path)
|
||||
target = File.join(PROJECT_ROOT_PATH, 'fixtures', path)
|
||||
config_path = File.join(current_dir, "config-#{config_name}.rb")
|
||||
config_dest = File.join(current_dir, "config.rb")
|
||||
config_dest = File.join(current_dir, 'config.rb')
|
||||
FileUtils.cp(config_path, config_dest)
|
||||
end
|
||||
|
||||
Given /^an empty app$/ do
|
||||
step %Q{a directory named "empty_app"}
|
||||
step %Q{I cd to "empty_app"}
|
||||
ENV["MM_ROOT"] = nil
|
||||
ENV['MM_ROOT'] = nil
|
||||
end
|
||||
|
||||
Given /^a fixture app "([^\"]*)"$/ do |path|
|
||||
ENV["MM_ROOT"] = nil
|
||||
ENV['MM_ROOT'] = nil
|
||||
|
||||
# This step can be reentered from several places but we don't want
|
||||
# to keep re-copying and re-cd-ing into ever-deeper directories
|
||||
|
@ -26,7 +26,7 @@ Given /^a fixture app "([^\"]*)"$/ do |path|
|
|||
|
||||
step %Q{a directory named "#{path}"}
|
||||
|
||||
target_path = File.join(PROJECT_ROOT_PATH, "fixtures", path)
|
||||
target_path = File.join(PROJECT_ROOT_PATH, 'fixtures', path)
|
||||
FileUtils.cp_r(target_path, current_dir)
|
||||
|
||||
step %Q{I cd to "#{path}"}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require "rack/test"
|
||||
require 'rack/test'
|
||||
|
||||
Given /^a clean server$/ do
|
||||
@initialize_commands = []
|
||||
|
@ -9,7 +9,7 @@ end
|
|||
Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state|
|
||||
@initialize_commands ||= []
|
||||
|
||||
if state == "enabled"
|
||||
if state == 'enabled'
|
||||
@initialize_commands << lambda { activate(feature.to_sym) }
|
||||
end
|
||||
end
|
||||
|
@ -34,13 +34,13 @@ end
|
|||
Given /^the Server is running$/ do
|
||||
root_dir = File.expand_path(current_dir)
|
||||
|
||||
if File.exists?(File.join(root_dir, "source"))
|
||||
ENV["MM_SOURCE"] = "source"
|
||||
if File.exists?(File.join(root_dir, 'source'))
|
||||
ENV['MM_SOURCE'] = 'source'
|
||||
else
|
||||
ENV["MM_SOURCE"] = ""
|
||||
ENV['MM_SOURCE'] = ''
|
||||
end
|
||||
|
||||
ENV["MM_ROOT"] = root_dir
|
||||
ENV['MM_ROOT'] = root_dir
|
||||
|
||||
initialize_commands = @initialize_commands || []
|
||||
initialize_commands.unshift lambda {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue