Sha256: 22ba8c8351db72cf46f292181b03b87778ea17e851ccbe165d16c8e8b573823b

Contents?: true

Size: 879 Bytes

Versions: 1

Compression:

Stored size: 879 Bytes

Contents

require_relative '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
testrocket-0.0.2 test/test_testrocket.rb