Sha256: 79eaf58c7288e905d7f1b20aa083c805ba5bc6812eea11b492a30fd9aad320bb

Contents?: true

Size: 535 Bytes

Versions: 3

Compression:

Stored size: 535 Bytes

Contents

require 'spec_helper'

module Doctest::RSpec

  describe 'expect(doctest).to be_a_valid_doctest' do

    let(:valid_doctest){ Doctest::Core::Doctest.new("5", "5", nil, nil) }
    let(:invalid_doctest){ Doctest::Core::Doctest.new("4", "5", nil, nil) }

    it 'passes if the doctest is valid' do
      expect(valid_doctest).to be_a_valid_doctest
    end

    it 'fails if the doctest is invalid' do
      expect {
        expect(invalid_doctest).to be_a_valid_doctest
      }.to raise_error("expected 4 to equal 5")
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
doctest-rspec-0.0.3 spec/lib/doctest/rspec/be_a_valid_doctest_spec.rb
doctest-rspec-0.0.2 spec/lib/doctest/rspec/be_a_valid_doctest_spec.rb
doctest-rspec-0.0.1 spec/lib/doctest/rspec/be_a_valid_doctest_spec.rb