Sha256: 4132ffaa5dc410d7bfdf7e1c5e698b80da3dc1282c1140f417110862a9a1184f

Contents?: true

Size: 1.31 KB

Versions: 40

Compression:

Stored size: 1.31 KB

Contents

Feature: heckle a class

  As an RSpec user who wants to verify that
    my specs cover what I think it covers
  I want to heckle a class

  Scenario: Heckle finds problems
    Given a file named "heckle_fail_spec.rb" with:
      """
      class Thing
        def a_or_b
          if true
            "a"
          else
            "b"
          end
        end
      end

      describe Thing do
        it "returns a for true" do
          Thing.new.a_or_b.should == "a"
        end
      end
      """
    When I run "spec heckle_fail_spec.rb --heckle Thing"
    Then the stdout should match "The following mutations didn't cause test failures:"
    But the stdout should not match "FAILED"

  Scenario: Heckle does not find a problem
    Given a file named "heckle_success_spec.rb" with:
      """
      class Thing
        def a_or_b(key)
          if key
            "a"
          else
            "b"
          end
        end
      end

      describe Thing do
        it "returns a for true" do
          Thing.new.a_or_b(true).should == "a"
        end

        it "returns b for false" do
          Thing.new.a_or_b(false).should == "b"
        end
      end
      """
    When I run "spec heckle_success_spec.rb --heckle Thing"
    Then the stdout should match "No mutants survived"
    But the stdout should not match "FAILED"

Version data entries

40 entries across 40 versions & 9 rubygems

Version Path
rspec-instructure-1.3.3 features-pending/heckle/heckle.feature
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/features-pending/heckle/heckle.feature
rspec-1.3.2 features-pending/heckle/heckle.feature
rspec-core-2.0.0.beta.3 features-pending/heckle/heckle.feature
rspec-core-2.0.0.beta.2 features-pending/heckle/heckle.feature
rspec-core-2.0.0.beta.1 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a10 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a9 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a8 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a7 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a6 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a5 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a4 features-pending/heckle/heckle.feature
rspec-core-2.0.0.a3 features-pending/heckle/heckle.feature
hubbub-0.0.11 lib/vendor/plugins/rspec/features-pending/heckle/heckle.feature
hubbub-0.0.10 lib/vendor/plugins/rspec/features-pending/heckle/heckle.feature
hubbub-0.0.9 lib/vendor/plugins/rspec/features-pending/heckle/heckle.feature
hubbub-0.0.8 lib/vendor/plugins/rspec/features-pending/heckle/heckle.feature
hubbub-0.0.6 lib/vendor/plugins/rspec/features-pending/heckle/heckle.feature
media-path-0.1.2 vendor/rspec/features-pending/heckle/heckle.feature