Sha256: e7d5e4e5183b491954a6eee72ebff8da9fe3270e16a91ec5c71d5a7ff7ba1b4a

Contents?: true

Size: 1018 Bytes

Versions: 3

Compression:

Stored size: 1018 Bytes

Contents

require 'spec_helper'
require 'tempfile'

describe AllureRubyAdaptorApi do
  let(:builder) { AllureRubyAdaptorApi::Builder }

  it "should build xml report" do

    builder.start_suite "some_suite", :severity => :normal
    builder.start_test "some_suite", "some_test", :feature => "Some feature"
    builder.start_step "some_suite", "some_test", "first step"
    builder.stop_step "some_suite", "some_test", "first step"
    builder.start_step "some_suite", "some_test", "second step"
    builder.stop_step "some_suite", "some_test", "second step"
    builder.start_step "some_suite", "some_test", "third step"
    builder.stop_step "some_suite", "some_test", "third step", :failed
    builder.stop_test "some_suite", "some_test", :status => :broken, :exception => Exception.new("some error")
    builder.stop_suite "some_suite"

    builder.build! {|suite, xml|
      xml.should_not be_empty
      xml.should include("<ns2:test-suite")
      xml.should include("<title>some_suite</title>")
      xml
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
allure-ruby-adaptor-api-0.6.3 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.2 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.1 spec/extend_steps_spec.rb