Sha256: b2c9f94f622c5426a17211231cdaa8068524923e2e2b179b14711e94e01d6e57

Contents?: true

Size: 676 Bytes

Versions: 5

Compression:

Stored size: 676 Bytes

Contents

require 'spec_helper'

module Spec
  module Matchers
    describe "wrap_expectation" do
      before { Spec.stub(:deprecate) }
      
      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

5 entries across 5 versions & 3 rubygems

Version Path
rspec-instructure-1.3.3 spec/spec/expectations/wrap_expectation_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/spec/spec/expectations/wrap_expectation_spec.rb
rspec-1.3.2 spec/spec/expectations/wrap_expectation_spec.rb
rspec-1.3.1 spec/spec/expectations/wrap_expectation_spec.rb
rspec-1.3.1.rc spec/spec/expectations/wrap_expectation_spec.rb