Sha256: 96d4a235e126402b571cd7adb4b8a1a686efb38a126f9735de50fb0204e030be

Contents?: true

Size: 1.11 KB

Versions: 27

Compression:

Stored size: 1.11 KB

Contents

Story: 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

27 entries across 27 versions & 9 rubygems

Version Path
rspec-1.3.0 features/interop/test_case_with_should_methods.feature
hubbub-0.0.11 lib/vendor/plugins/rspec/features/interop/test_case_with_should_methods.feature
hubbub-0.0.10 lib/vendor/plugins/rspec/features/interop/test_case_with_should_methods.feature
hubbub-0.0.9 lib/vendor/plugins/rspec/features/interop/test_case_with_should_methods.feature
hubbub-0.0.8 lib/vendor/plugins/rspec/features/interop/test_case_with_should_methods.feature
hubbub-0.0.6 lib/vendor/plugins/rspec/features/interop/test_case_with_should_methods.feature
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/features/interop/test_case_with_should_methods.feature
media-path-0.1.2 vendor/rspec/features/interop/test_case_with_should_methods.feature
simple-templater-0.0.1.3 vendor/rspec/features/interop/test_case_with_should_methods.feature
pupu-0.0.2.pre vendor/rspec/features/interop/test_case_with_should_methods.feature
media-path-0.1.1.pre vendor/rspec/features/interop/test_case_with_should_methods.feature
simple-templater-0.0.1.2 vendor/rspec/features/interop/test_case_with_should_methods.feature
media-path-0.1.1 vendor/rspec/features/interop/test_case_with_should_methods.feature
simple-templater-0.0.1.1 vendor/rspec/features/interop/test_case_with_should_methods.feature
pupu-0.0.2 vendor/rspec/features/interop/test_case_with_should_methods.feature
rango-0.0.6 vendor/rspec/features/interop/test_case_with_should_methods.feature
rango-0.1.pre vendor/rspec/features/interop/test_case_with_should_methods.feature
pupu-0.0.1 vendor/rspec/features/interop/test_case_with_should_methods.feature
media-path-0.1 vendor/rspec/features/interop/test_case_with_should_methods.feature
simple-templater-0.0.1 vendor/rspec/features/interop/test_case_with_should_methods.feature