spec/spec_helper.rb in similar_models-0.1.0 vs spec/spec_helper.rb in similar_models-0.2.0
- old
+ new
@@ -6,11 +6,11 @@
# see http://blog.markstarkman.com/blog/2013/01/23/using-sqlite-to-test-active-record-models/
require 'active_record'
ActiveRecord::Base.establish_connection adapter: 'postgresql', database: 'similar_models'
-# ActiveRecord::Base.establish_connection adapter: 'mysql2', database: 'similar_models'
+# ActiveRecord::Base.establish_connection adapter: 'mysql2', database: 'similar_models', username: 'test'
# ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:'
load 'support/schema.rb'
require 'similar_models'
require 'support/models'
@@ -21,9 +21,19 @@
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
config.run_all_when_everything_filtered = true
config.filter_run :focus
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = 'doc'
+ end
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234