Upgraded Rails and RSpec
[monkeycharger.git] / vendor / plugins / rspec / examples / test_case_adapter_example.rb
blob02ba3be176272995fed7e51a395577bd0e1040d5
1 #This is an example of using RSpec's expectations in test/unit.
2 $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")
4 require 'test/unit'
5 require 'spec/test_case_adapter'
7 class IntegratingRSpecExpectationsIntoTestCaseTest < Test::Unit::TestCase
9   def test_should_support_rspecs_equality_expectations
10     5.should == 5
11   end
13   def test_should_support_rspecs_comparison_expectations
14     5.should be > 4
15   end
16   
17   class Band
18     def players
19       ["John", "Paul", "George", "Ringo"]
20     end
21   end
23   def test_should_support_rspecs_collection_expectations
24     Band.new.should have(4).players
25   end
26 end