Sha256: e43fddbd92077f97cdc803d6890947fb0267399f90af049a10324d927527b73f
Contents?: true
Size: 615 Bytes
Versions: 8
Compression:
Stored size: 615 Bytes
Contents
#This is an example of using RSpec's expectations in test/unit. $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib") require 'test/unit' require 'spec/test_case_adapter' class IntegratingRSpecExpectationsIntoTestCaseTest < Test::Unit::TestCase def test_should_support_rspecs_equality_expectations 5.should == 5 end def test_should_support_rspecs_comparison_expectations 5.should be > 4 end class Band def players ["John", "Paul", "George", "Ringo"] end end def test_should_support_rspecs_collection_expectations Band.new.should have(4).players end end
Version data entries
8 entries across 8 versions & 3 rubygems