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

Version Path
deckshuffler-0.0.2 vendor/plugins/rspec/examples/test_case_adapter_example.rb
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/examples/test_case_adapter_example.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/examples/test_case_adapter_example.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/examples/test_case_adapter_example.rb
rspec-1.0.5 examples/test_case_adapter_example.rb
rspec-1.0.6 examples/test_case_adapter_example.rb
rspec-1.0.7 examples/test_case_adapter_example.rb
rspec-1.0.8 examples/test_case_adapter_example.rb