PageRenderTime 35ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/jruby-1.1.6RC1/lib/ruby/gems/1.8/gems/rspec-1.1.11/stories/resources/test/test_case_with_should_methods.rb

https://bitbucket.org/nicksieger/advent-jruby
Ruby | 30 lines | 24 code | 6 blank | 0 comment | 2 complexity | 14b6fb666c843b25d9e9a63c2e1d274d MD5 | raw file
Possible License(s): CPL-1.0, AGPL-1.0, LGPL-2.1, JSON
  1. $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
  2. require 'test/unit'
  3. require 'spec'
  4. require 'spec/interop/test'
  5. class MySpec < Test::Unit::TestCase
  6. def should_pass_with_should
  7. 1.should == 1
  8. end
  9. def should_fail_with_should
  10. 1.should == 2
  11. end
  12. def should_pass_with_assert
  13. assert true
  14. end
  15. def should_fail_with_assert
  16. assert false
  17. end
  18. def test
  19. raise "This is not a real test"
  20. end
  21. def test_ify
  22. raise "This is a real test"
  23. end
  24. end