Sha256: 7619120a2b1ff96b7d0203def379c0b0591abf71541ea671c39367be6dff3ddf

Contents?: true

Size: 1.28 KB

Versions: 35

Compression:

Stored size: 1.28 KB

Contents

require File.dirname(__FILE__) + '/test_unit_spec_helper'

describe "ExampleGroup with test/unit/interop" do
  include TestUnitSpecHelper
    
  describe "with passing examples" do
    it "should output 0 failures" do
      output = ruby("#{resources}/spec_that_passes.rb")
      output.should include("1 example, 0 failures")
    end

    it "should return an exit code of 0" do
      ruby("#{resources}/spec_that_passes.rb")
      $?.should == 0
    end
  end

  describe "with failing examples" do
    it "should output 1 failure" do
      output = ruby("#{resources}/spec_that_fails.rb")
      output.should include("1 example, 1 failure")
    end

    it "should return an exit code of 256" do
      ruby("#{resources}/spec_that_fails.rb")
      $?.should == 256
    end
  end

  describe "with example that raises an error" do
    it "should output 1 failure" do
      output = ruby("#{resources}/spec_with_errors.rb")
      output.should include("1 example, 1 failure")
    end

    it "should return an exit code of 256" do
      ruby("#{resources}/spec_with_errors.rb")
      $?.should == 256
    end
  end
  
  describe "options hash" do
    it "should be exposed" do
      output = ruby("#{resources}/spec_with_options_hash.rb")
      output.should include("1 example, 0 failures")
    end
  end
end

Version data entries

35 entries across 35 versions & 5 rubygems

Version Path
dchelimsky-rspec-1.1.11.1 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.11.2 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.11.3 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.11.4 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.11.5 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.11.6 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.11.7 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.12 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.1 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.13 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.2 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.3 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.4 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.5 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.6 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.7 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.8 spec/spec/interop/test/unit/spec_spec.rb
dchelimsky-rspec-1.1.99.9 spec/spec/interop/test/unit/spec_spec.rb
newbamboo-evented-rspec-1.1.12 spec/spec/interop/test/unit/spec_spec.rb
newbamboo-rspec-1.1.12 spec/spec/interop/test/unit/spec_spec.rb