Skip to content

Commit

Permalink
Update rspec configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio Monti committed Sep 7, 2016
1 parent 945d3e9 commit 5784f34
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,4 +6,5 @@
/doc/
/pkg/
/spec/reports/
/spec/examples.txt
/tmp/
2 changes: 1 addition & 1 deletion .rspec
@@ -1,2 +1,2 @@
--format documentation
--color
--require spec_helper
2 changes: 0 additions & 2 deletions skuby.gemspec
Expand Up @@ -35,6 +35,4 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "webmock"
spec.add_development_dependency "vcr"
spec.add_development_dependency "coveralls"
spec.add_development_dependency "mocha"
end
4 changes: 1 addition & 3 deletions spec/credit_spec.rb
@@ -1,6 +1,4 @@
require 'spec_helper'

describe Skuby::Credit do
RSpec.describe Skuby::Credit do

before do
Skuby.setup do |config|
Expand Down
4 changes: 1 addition & 3 deletions spec/gateway_spec.rb
@@ -1,6 +1,4 @@
require 'spec_helper'

describe Skuby::Gateway do
RSpec.describe Skuby::Gateway do

before do
Skuby.setup do |config|
Expand Down
3 changes: 1 addition & 2 deletions spec/report_spec.rb
@@ -1,7 +1,6 @@
require 'spec_helper'
require 'yaml'

describe Skuby::Report do
RSpec.describe Skuby::Report do
let(:report) { Skuby::Report.new(params) }

context "with errors" do
Expand Down
29 changes: 18 additions & 11 deletions spec/spec_helper.rb
@@ -1,22 +1,29 @@
require 'coveralls'
Coveralls.wear!

require 'webmock/rspec'
require 'mocha/api'
require 'vcr'

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'skuby'

RSpec.configure do |config|
config.expect_with :rspec do |c|
c.syntax = :expect
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end

config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end

config.shared_context_metadata_behavior = :apply_to_host_groups
config.filter_run_when_matching :focus
config.example_status_persistence_file_path = "spec/examples.txt"
config.disable_monkey_patching!
config.warnings = true
if config.files_to_run.one?
config.default_formatter = 'doc'
end
config.treat_symbols_as_metadata_keys_with_true_values = true
config.run_all_when_everything_filtered = true
config.filter_run :focus
config.mock_framework = :mocha
config.order = 'random'
# config.profile_examples = 10
config.order = :random
Kernel.srand config.seed
end

VCR.configure do |c|
Expand Down

0 comments on commit 5784f34

Please sign in to comment.