Sha256: dd1f4bbe00d5f4510b35bb99ab4a94762f68563957983439ca5bb254fdc297b5

Contents?: true

Size: 633 Bytes

Versions: 11

Compression:

Stored size: 633 Bytes

Contents

module Remarkable
  module Specs
    module Matchers
      class BeAPersonMatcher < Remarkable::Base
        arguments

        optional :first_name
        optional :age, :default => 18
        optional :last_name, :alias => :family_name
        optional :bands, :splat => true
        optional :builder, :block => true

        attr_reader :options

        def description
          "be a person"
        end

        def expectation
          "is not a person"
        end
      end

      def be_a_person(*args, &block)
        BeAPersonMatcher.new(*args, &block).spec(self)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
remarkable-3.1.7 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.8 spec/matchers/be_a_person_matcher.rb
remarkable-3.0.10 spec/matchers/be_a_person_matcher.rb
remarkable-3.0.9 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.3 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.4 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.5 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.6 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.1 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.0 spec/matchers/be_a_person_matcher.rb
remarkable-3.1.2 spec/matchers/be_a_person_matcher.rb