Sha256: 3a0ffa7e922984c69d584f3a83592b7d972340b8f9bd42f1032fe117870759c8

Contents?: true

Size: 580 Bytes

Versions: 175

Compression:

Stored size: 580 Bytes

Contents

module RSpec
  module Matchers
    module BuiltIn
      class Satisfy
        def initialize(&block)
          @block = block
        end

        def matches?(actual, &block)
          @block = block if block
          @actual = actual
          @block.call(actual)
        end

        def failure_message_for_should
          "expected #{@actual} to satisfy block"
        end

        def failure_message_for_should_not
          "expected #{@actual} not to satisfy block"
        end

        def description
          "satisfy block"
        end
      end
    end
  end
end

Version data entries

175 entries across 77 versions & 11 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.5 vendor/bundle/gems/rspec-expectations-2.9.1/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.5 vendor/bundle/gems/rspec-expectations-2.9.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.4 vendor/bundle/gems/rspec-expectations-2.9.1/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.4 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.4 vendor/bundle/gems/rspec-expectations-2.9.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.3 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.3 vendor/bundle/gems/rspec-expectations-2.9.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.3 vendor/bundle/gems/rspec-expectations-2.9.1/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.2 vendor/bundle/gems/rspec-expectations-2.9.1/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.2 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.2 vendor/bundle/gems/rspec-expectations-2.9.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.1 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.1 vendor/bundle/gems/rspec-expectations-2.9.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.1 vendor/bundle/gems/rspec-expectations-2.9.1/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.0 vendor/bundle/gems/rspec-expectations-2.9.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.0 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.7.0 vendor/bundle/gems/rspec-expectations-2.9.1/lib/rspec/matchers/built_in/satisfy.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb
classiccms-0.6.9 vendor/bundle/gems/rspec-expectations-2.10.0/lib/rspec/matchers/built_in/satisfy.rb