Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #517 from Antiarchitect/patch-1

Make rspec to copy schema structure if schema format is :sql.
  • Loading branch information...
commit 86eabe1453b2929eea56c408edd49e6fc2b3b95c 2 parents d05b9a8 + 6d726b5
@justinko justinko authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/rspec/rails/tasks/rspec.rake
View
7 lib/rspec/rails/tasks/rspec.rake
@@ -4,7 +4,12 @@ if default = Rake.application.instance_variable_get('@tasks')['default']
default.prerequisites.delete('test')
end
-spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "db:test:prepare" : :noop
+orm_setting = Rails.configuration.generators.options[:rails][:orm]
+spec_prereq = if(orm_setting == :active_record)
+ Rails.configuration.active_record[:schema_format] == :sql ? "db:test:clone_structure" : "db:test:prepare"
+else
+ :noop
+end
task :noop do; end
task :default => :spec
Please sign in to comment.
Something went wrong with that request. Please try again.