Sha256: 68574bf25511333a9790f53b2814d2c2a8cc81d1e2d56844c25aafab1aefea83

Contents?: true

Size: 514 Bytes

Versions: 8

Compression:

Stored size: 514 Bytes

Contents

require 'test/unit'
require 'test/unit/given'

class TestSimpleGiven < Test::Unit::Given::TestCase

  test_that "when assigning @x to 4, it is 4" do
    Given {
      @x = nil
    }
    When {
      @x = 4
    }
    Then {
      assert_equal 4,@x
    }
  end

  test_that {
    Given {
      @x = nil
    }
    When {
      @x = 4
    }
    Then {
      assert_equal 4,@x
    }
  }

  def test_that_test_that_barfs_with_no_block
    assert_raises RuntimeError do
      self.class.test_that "foo"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
test_unit-given-0.9.4 test/test_test_that.rb
test_unit-given-0.9.3 test/test_test_that.rb
test_unit-given-0.9.2 test/test_test_that.rb
test_unit-given-0.9.1 test/test_test_that.rb
test_unit-given-0.9.0 test/test_test_that.rb
test_unit-given-0.1.1 test/test_test_that.rb
test_unit-given-0.1.0 test/test_test_that.rb
test_unit-given-0.0.1 test/test_test_that.rb