Sha256: 034b4511a3fa039fd8bfb9221a50eedf6a2bbc8733c592925919f6ee7b70d49b

Contents?: true

Size: 636 Bytes

Versions: 27

Compression:

Stored size: 636 Bytes

Contents

require 'spec_helper'

module Spec
  module Matchers
    describe "wrap_expectation" do
      
      def stub_matcher
        @_stub_matcher ||= simple_matcher do
        end
      end
      
      def failing_matcher
        @_failing_matcher ||= simple_matcher do
          1.should == 2
        end
      end
      
      it "should return true if there is no error" do
        wrap_expectation stub_matcher do
        end.should be_true
      end
      
      it "should return false if there is an error" do
        wrap_expectation failing_matcher do
          raise "error"
        end.should be_false
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 9 rubygems

Version Path
rspec-1.3.0 spec/spec/expectations/wrap_expectation_spec.rb
hubbub-0.0.11 lib/vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb
hubbub-0.0.10 lib/vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb
hubbub-0.0.9 lib/vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb
hubbub-0.0.8 lib/vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb
hubbub-0.0.6 lib/vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/spec/spec/expectations/wrap_expectation_spec.rb
media-path-0.1.2 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
simple-templater-0.0.1.3 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
pupu-0.0.2.pre vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
media-path-0.1.1.pre vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
simple-templater-0.0.1.2 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
media-path-0.1.1 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
simple-templater-0.0.1.1 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
pupu-0.0.2 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
rango-0.0.6 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
rango-0.1.pre vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
pupu-0.0.1 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
media-path-0.1 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb
simple-templater-0.0.1 vendor/rspec/spec/spec/expectations/wrap_expectation_spec.rb