Sha256: a7572e0ba6dcbfbc38915a134b8dcce9238e5e925961ba394dc8d8a269fd7971

Contents?: true

Size: 572 Bytes

Versions: 16

Compression:

Stored size: 572 Bytes

Contents

class RSpecRemote
  def self.run_example(example)
    run_describe_block(<<-describe_block)
      describe 'context' do
        it 'should pass' do
          #{example}
        end
      end
    describe_block
  end
end


RSpecCandy::Switcher.define_matcher :pass_as_example do

  match do |example|
    rspec_out = RSpecRemote.run_example(example)
    rspec_out.include?('0 failures')
  end

end

RSpecCandy::Switcher.define_matcher :fail_as_example do

  match do |example|
    rspec_out = RSpecRemote.run_example(example)
    rspec_out.include?('1 failure')
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rspec_candy-0.3.1 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.3.0 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.10 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.9 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.8 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.7 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.6 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.5 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.4 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.3 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.2 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.1 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.2.0 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.1.2 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.1.1 spec/shared/support/matchers/pass_as_example.rb
rspec_candy-0.1.0 spec/shared/support/matchers/pass_as_example.rb