Sha256: eaca6ef8139ac18fb63101cd632d2fa088d6f55105c6b7e1ef6bfe640f2197a4

Contents?: true

Size: 870 Bytes

Versions: 1

Compression:

Stored size: 870 Bytes

Contents

require 'helper'

describe TestRocket do
  it "should find emptiness non-truthful by default" do
    (+->{}).must_match(/FAIL/)
  end
  
  it "should pass a simple positive assertion" do
    (+->{ 2 + 2 == 4 }).must_match(/OK/)
  end

  it "should pass a simple negative assertion" do
    (-->{ 2 + 2 == 5 }).must_match(/OK/)
  end
  
  it "should fail a simple erroneous assertion" do
    (+->{ 2 + 2 == 5 }).must_match(/FAIL/)
  end

  it "should fail a simple correct assertion assumed to fail" do
    (-->{ 2 + 2 == 4 }).must_match(/FAIL/)
  end
  
  it "should give a pending notice" do
    (~->{ "a pending test" }).must_match(/PENDING/)
    (~->{ "a pending test" }).must_match(/a pending test/)
  end
  
  it "should fire a description rocket" do
    (!->{ "a description" }).must_match(/FIRE/)
    (!->{ "a description" }).must_match(/a description/)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aki-testrocket-0.0.2 test/test_testrocket.rb