Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Regenerate RSpec configuration

  • Loading branch information...
commit 0d2a4b7e24f6b90414062fe7e4431f8cd5de3094 1 parent e72cccd
@njonsson authored
Showing with 25 additions and 4 deletions.
  1. +2 −0  .rspec
  2. +4 −1 Guardfile
  3. +1 −1  Rakefile
  4. +18 −2 spec/spec_helper.rb
View
2  .rspec
@@ -0,0 +1,2 @@
+--color
+--format progress
View
5 Guardfile
@@ -1,4 +1,4 @@
-guard :rspec, :cli => '--color --debugger' do
+guard :rspec, :cli => '--debugger' do
# Run the corresponding spec (or all specs) when code changes.
watch( %r{^lib/(.+)\.rb$} ) do |match|
corresponding_spec = "spec/#{match[1]}_spec.rb"
@@ -12,6 +12,9 @@ guard :rspec, :cli => '--color --debugger' do
# Run a spec when it changes.
watch %r{^spec/.+_spec\.rb$}
+ # Run all specs when the RSpec configuration changes.
+ watch( 'spec/spec_helper.rb' ) { 'spec' }
+
# Run all specs when the bundle changes.
watch( 'Gemfile.lock' ) { 'spec' }
end
View
2  Rakefile
@@ -21,7 +21,7 @@ end
def define_spec_task(name, options={})
RSpec::Core::RakeTask.new name do |t|
- t.rspec_opts = ['--color']
+ t.rspec_opts ||= []
unless options[:debug] == false
begin
require 'ruby-debug'
View
20 spec/spec_helper.rb
@@ -1,3 +1,19 @@
-RSpec.configure do |c|
- c.alias_it_should_behave_like_to :should_behave_like, 'should behave like'
+# This file was generated by the `rspec --init` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# Require this file using `require "spec_helper"` to ensure that it is only
+# loaded once.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ config.treat_symbols_as_metadata_keys_with_true_values = true
+ config.run_all_when_everything_filtered = true
+ config.filter_run :focus
+
+ # 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
+ config.order = 'random'
+
+ config.alias_it_should_behave_like_to :should_behave_like, 'should behave like'
end
Please sign in to comment.
Something went wrong with that request. Please try again.