diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/doubles/database.rb | 10 | ||||
-rw-r--r-- | spec/spec_helper.rb | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/spec/doubles/database.rb b/spec/doubles/database.rb index c28e9b1a0b..3be11a9164 100644 --- a/spec/doubles/database.rb +++ b/spec/doubles/database.rb @@ -1,3 +1,5 @@ +require 'active_record/connection_adapters/abstract/quoting' + module Fake class Engine def connection @@ -7,7 +9,7 @@ module Fake class Connection include ActiveRecord::ConnectionAdapters::Quoting - + def columns(table_name, comment) { "users" => [ @@ -26,7 +28,7 @@ module Fake def execute(*args) [] end - + def quote_column_name(column_name) "`#{column_name}`" end @@ -38,10 +40,10 @@ module Fake class Column attr_reader :name, :type - + def initialize(name, type) @name = name @type = type end end -end
\ No newline at end of file +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index eb87e2448c..ce539b6ffa 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,10 +11,10 @@ require 'arel' Dir["#{dir}/#{helper}/*"].each { |m| require "#{dir}/#{helper}/#{File.basename(m)}" } end -Spec::Runner.configure do |config| +Spec::Runner.configure do |config| config.include(BeLikeMatcher, HashTheSameAsMatcher, DisambiguateAttributesMatcher) config.mock_with :rr config.before do Arel::Table.engine = Arel::Engine.new(Fake::Engine.new) end -end
\ No newline at end of file +end |