aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorKir2012-01-28 11:53:22 +0200
committerKir2012-01-28 11:53:22 +0200
commit18fcbf4838a3f2835edd526a1bf77f1b846d4e25 (patch)
treece5f9511451d6974fcf2f59e767c64714d73ab25 /spec/spec_helper.rb
parent95877d8f982be9a4476cec5943749dcf5db6f524 (diff)
parent626ff121111194ec6fa424f36de8658bf72873ba (diff)
downloadinboxes-0.2.1.tar.bz2
Merging with rspecv0.2.1
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..5caa0f5
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,29 @@
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'rails'
+require 'active_record'
+require 'inboxes'
+# require 'database_cleaner'
+# Ensure we use 'syck' instead of 'psych' in 1.9.2
+# RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
+# Psych does not yet support YAML 1.1 merge keys.
+# Merge keys is often used in mongoid.yml
+# See: http://redmine.ruby-lang.org/issues/show/4300
+if RUBY_VERSION >= '1.9.2'
+ YAML::ENGINE.yamler = 'syck'
+end
+# require 'fake_gem'
+require 'fake_app'
+
+require 'rspec/rails'
+# Requires supporting files with custom matchers and macros, etc,
+# in ./support/ and its subdirectories.
+Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
+
+# RSpec.configure do |config|
+# config.mock_with :rr
+# config.before :all do
+# # ActiveRecord::Base.connection.execute 'CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))' unless ActiveRecord::Base.connection.table_exists? 'users'
+# # CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'users'
+# end
+# end \ No newline at end of file