Replace hash rockets with new syntax (#802)
* update rocket hash syntax in Guardfile * update rocket hash syntax in spec/dummy/lib/tasks/test.rake * update rocket hash syntax in lib/draper/tasks/test.rake * update rocket hash syntax in lib/generators/mini_test/decorator_generator.rb * update rocket hash syntax in schema from dummy app
This commit is contained in:
parent
387878f39c
commit
f441d11dcd
10
Guardfile
10
Guardfile
|
@ -1,25 +1,25 @@
|
||||||
def rspec_guard(options = {}, &block)
|
def rspec_guard(options = {}, &block)
|
||||||
options = {
|
options = {
|
||||||
:version => 2,
|
version: 2,
|
||||||
:notification => false
|
notification: false
|
||||||
}.merge(options)
|
}.merge(options)
|
||||||
|
|
||||||
guard 'rspec', options, &block
|
guard 'rspec', options, &block
|
||||||
end
|
end
|
||||||
|
|
||||||
rspec_guard :spec_paths => %w{spec/draper spec/generators} do
|
rspec_guard spec_paths: %w{spec/draper spec/generators} do
|
||||||
watch(%r{^spec/.+_spec\.rb$})
|
watch(%r{^spec/.+_spec\.rb$})
|
||||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||||
watch('spec/spec_helper.rb') { "spec" }
|
watch('spec/spec_helper.rb') { "spec" }
|
||||||
end
|
end
|
||||||
|
|
||||||
rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'development'} do
|
rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'development'} do
|
||||||
watch(%r{^spec/.+_spec\.rb$})
|
watch(%r{^spec/.+_spec\.rb$})
|
||||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||||
watch('spec/spec_helper.rb') { "spec" }
|
watch('spec/spec_helper.rb') { "spec" }
|
||||||
end
|
end
|
||||||
|
|
||||||
rspec_guard :spec_paths => 'spec/integration', :env => {'RAILS_ENV' => 'production'} do
|
rspec_guard spec_paths: 'spec/integration', env: {'RAILS_ENV' => 'production'} do
|
||||||
watch(%r{^spec/.+_spec\.rb$})
|
watch(%r{^spec/.+_spec\.rb$})
|
||||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||||
watch('spec/spec_helper.rb') { "spec" }
|
watch('spec/spec_helper.rb') { "spec" }
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'rake/testtask'
|
||||||
require 'rails/test_unit/railtie'
|
require 'rails/test_unit/railtie'
|
||||||
|
|
||||||
namespace :test do
|
namespace :test do
|
||||||
Rake::TestTask.new(:decorators => "test:prepare") do |t|
|
Rake::TestTask.new(decorators: "test:prepare") do |t|
|
||||||
t.libs << "test"
|
t.libs << "test"
|
||||||
t.pattern = "test/decorators/**/*_test.rb"
|
t.pattern = "test/decorators/**/*_test.rb"
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,7 @@ module MiniTest
|
||||||
File.expand_path('../templates', __FILE__)
|
File.expand_path('../templates', __FILE__)
|
||||||
end
|
end
|
||||||
|
|
||||||
class_option :spec, :type => :boolean, :default => false, :desc => "Use MiniTest::Spec DSL"
|
class_option :spec, type: :boolean, default: false, desc: "Use MiniTest::Spec DSL"
|
||||||
|
|
||||||
check_class_collision suffix: "DecoratorTest"
|
check_class_collision suffix: "DecoratorTest"
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20121019115657) do
|
ActiveRecord::Schema.define(version: 20121019115657) do
|
||||||
|
|
||||||
create_table "posts", :force => true do |t|
|
create_table "posts", force: true do |t|
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", null: false
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,4 +13,4 @@ RSpec::Core::RakeTask.new :fast_spec do |t|
|
||||||
t.pattern = "fast_spec/**/*_spec.rb"
|
t.pattern = "fast_spec/**/*_spec.rb"
|
||||||
end
|
end
|
||||||
|
|
||||||
task :default => [:test, :spec, :fast_spec]
|
task default: [:test, :spec, :fast_spec]
|
||||||
|
|
Loading…
Reference in New Issue