Skip to content

Commit

Permalink
Merge pull request rspec#517 from Antiarchitect/patch-1
Browse files Browse the repository at this point in the history
Make rspec to copy schema structure if schema format is :sql.
  • Loading branch information
justinko committed Mar 8, 2012
2 parents d05b9a8 + 6d726b5 commit 86eabe1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/rspec/rails/tasks/rspec.rake
Expand Up @@ -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

Expand Down

0 comments on commit 86eabe1

Please sign in to comment.