Sha256: e20e7c4886f0a274a8a905dbcf5e714555962b5a5a8558d4ce696a77f2ac2b81

Contents?: true

Size: 271 Bytes

Versions: 7

Compression:

Stored size: 271 Bytes

Contents

module Lawyer
  module RSpec
    module ContractDouble
      def contract_double(contract)
        methods = {}
        contract.clauses.each do |clause|
          methods[clause.name] = true
        end
        double(contract.name, methods)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lawyer-0.0.7 lib/lawyer/rspec/contract_double.rb
lawyer-0.0.6 lib/lawyer/rspec/contract_double.rb
lawyer-0.0.5 lib/lawyer/rspec/contract_double.rb
lawyer-0.0.4 lib/lawyer/rspec/contract_double.rb
lawyer-0.0.3 lib/lawyer/rspec/contract_double.rb
lawyer-0.0.2 lib/lawyer/rspec/contract_double.rb
lawyer-0.0.1 lib/lawyer/rspec/contract_double.rb