aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-04-23 11:02:39 -0300
committerEmilio Tagua <miloops@gmail.com>2009-04-23 11:02:39 -0300
commitcc80d8df045b1b24e725a40f17002c6c50df5f14 (patch)
treee64715cea580b7d65daa94d698896a74bef4b796 /spec
parentaeb09afd73cf188c6aee22bf4dd0f1beb937ac22 (diff)
downloadrails-cc80d8df045b1b24e725a40f17002c6c50df5f14.tar.gz
rails-cc80d8df045b1b24e725a40f17002c6c50df5f14.tar.bz2
rails-cc80d8df045b1b24e725a40f17002c6c50df5f14.zip
Quoting must be required
Diffstat (limited to 'spec')
-rw-r--r--spec/doubles/database.rb10
-rw-r--r--spec/spec_helper.rb4
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