Sha256: aa81a34eaa99a620044220fbbf481a1be7c0f864a49541070d6cd20508eed9fc
Contents?: true
Size: 670 Bytes
Versions: 1
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module RSpec module Rails # @!parse # # Checks that tests use RSpec `before` hook over Rails `setup` # # method. # # # # @example # # # bad # # setup do # # allow(foo).to receive(:bar) # # end # # # # # good # # before do # # allow(foo).to receive(:bar) # # end # # # class AvoidSetupHook < RuboCop::Cop::RSpecRails::Base; end AvoidSetupHook = ::RuboCop::Cop::RSpecRails::AvoidSetupHook end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubocop-rspec-2.28.0 | lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb |