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