Sha256: d027e38ad8560e85bbc0d34c171bd049dd397d8703a40b029b761df07e0b7100

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

Feature: Test::Unit::TestCase extended by rspec with should methods

  As an RSpec adopter with existing Test::Unit tests
  I want to use should_* methods in a Test::Unit::TestCase
  So that I use RSpec with classes and methods that look more like RSpec examples

  Scenario Outline: TestCase with should methods
    Given a file named "test_case_with_should_methods.rb" with:
    """
    require 'spec/autorun'
    require 'spec/test/unit'

    class MyTest < Test::Unit::TestCase
      def should_pass_with_should
        1.should == 1
      end

      def should_fail_with_should
        1.should == 2
      end

      def should_pass_with_assert
        assert true
      end

      def should_fail_with_assert
        assert false
      end

      def test
        raise "This is not a real test"
      end

      def test_ify
        raise "This is a real test"
      end
    end
    """
    When I run "<Command> test_case_with_should_methods.rb"
    Then the exit code should be 256
    And the stdout should include "5 examples, 3 failures"

  Scenarios: Run with ruby and spec
    | Command |
    | ruby    |
    | spec    |

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
rspec-instructure-1.3.3 features/interop/test_case_with_should_methods.feature
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/features/interop/test_case_with_should_methods.feature
rspec-1.3.2 features/interop/test_case_with_should_methods.feature
rspec-1.3.1 features/interop/test_case_with_should_methods.feature
rspec-1.3.1.rc features/interop/test_case_with_should_methods.feature