Sha256: c30730e7f5c053d91869dd1c39b46a5a253c10a533a8889e5ecc4395874b63e3
Contents?: true
Size: 614 Bytes
Versions: 10
Compression:
Stored size: 614 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
10 entries across 10 versions & 1 rubygems