Sha256: 639d92396415f18bc33c82006282a3d58500456e6c6c10677eb1af1667bc7733

Contents?: true

Size: 468 Bytes

Versions: 5

Compression:

Stored size: 468 Bytes

Contents

module Bogus
  module RSpecExtensions
    def fake(name, opts = {}, &block)
      let(name) { fake(name, opts, &block) }
    end

    def fake_class(name, opts = {})
      before do
        fake_class(name, opts)
      end
    end

    def verify_contract(name)
      before do
        Bogus.record_calls_for(name, described_class)
      end

      RSpec.configure do |config|
        config.after(:suite) { Bogus.verify_contract!(name) }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bogus-0.1.0 lib/bogus/rspec_extensions.rb
bogus-0.0.4 lib/bogus/rspec_extensions.rb
bogus-0.0.3 lib/bogus/rspec_extensions.rb
bogus-0.0.3.rc.2 lib/bogus/rspec_extensions.rb
bogus-0.0.3.rc.1 lib/bogus/rspec_extensions.rb