Module: Crystalline::Spec

Defined in:
lib/crystalline/spec/rspec.rb,
lib/crystalline/spec/macros.rb

Defined Under Namespace

Modules: DSL

Class Method Summary collapse

Class Method Details

.install!Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/crystalline/spec/rspec.rb', line 5

def self.install!
  RSpec.configure do |config|
    config.before do
      allow_message_expectations_on_nil
    end

    # Enable flags like --only-failures and --next-failure
    config.example_status_persistence_file_path = ".rspec_status"

    # Disable RSpec exposing methods globally on `Module` and `main`
    config.disable_monkey_patching!

    config.expect_with :rspec do |c|
      c.syntax = :should
    end

    config.extend(Crystalline::Spec::DSL::Macros)
  end
end