Sha256: e7f6e506b0355b108f853a4fddff9280f44cd778a1058e35b54f7771060bfa89

Contents?: true

Size: 671 Bytes

Versions: 35

Compression:

Stored size: 671 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

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

35 entries across 35 versions & 5 rubygems

Version Path
dchelimsky-rspec-1.1.11.1 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.11.2 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.11.3 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.11.4 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.11.5 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.11.6 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.11.7 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.12 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.1 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.13 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.2 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.3 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.4 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.5 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.6 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.7 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.8 spec/spec/expectations/wrap_expectation_spec.rb
dchelimsky-rspec-1.1.99.9 spec/spec/expectations/wrap_expectation_spec.rb
newbamboo-evented-rspec-1.1.12 spec/spec/expectations/wrap_expectation_spec.rb
newbamboo-rspec-1.1.12 spec/spec/expectations/wrap_expectation_spec.rb