Sha256: 8e25cab7180b2e779964991eea53e18eeed9ba3c6cbefc0a37f08def45e2920f

Contents?: true

Size: 690 Bytes

Versions: 8

Compression:

Stored size: 690 Bytes

Contents

describe 'Opal ExpectationTarget' do
  context 'when constructed via #expect' do
    it 'fails an invalid negative expectation' do
      # Fixnum = Numeric on Opal
      # message = /expected 5 not to be a kind of Fixnum/
      message = /expected 5 not to be a kind of Num.*/
      expect {
        expect(5).not_to be_a(Fixnum)
      }.to fail_with(message)
    end

    it 'fails an invalid negative expectation with a split infinitive' do
      # Fixnum = Numeric on Opal
      # message = /expected 5 not to be a kind of Fixnum/
      message = /expected 5 not to be a kind of Num.*/
      expect {
        expect(5).to_not be_a(Fixnum)
      }.to fail_with(message)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
opal-rspec-0.6.2 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb
opal-rspec-0.7.0.rc.1 spec-opal-rspec/expectations/expectation_target_spec.rb
opal-rspec-0.6.1 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb
opal-rspec-0.6.0 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb
opal-rspec-0.6.0.beta1 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb
opal-connect-rspec-0.5.0 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb
opal-rspec-0.5.0 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb
opal-rspec-0.5.0.beta3 spec/rspec/expectations/opal_alternates/expectation_target_spec.rb