Sha256: b5b1b3e1dcaca237eec0ddeb845314db277b2179e0bcf4ce57315061df7001a4

Contents?: true

Size: 1.08 KB

Versions: 9

Compression:

Stored size: 1.08 KB

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.start_suite "some_empty_suite"
    builder.stop_suite "some_empty_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

9 entries across 9 versions & 1 rubygems

Version Path
allure-ruby-adaptor-api-0.7.2 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.7.1 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.7.0 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.10 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.9 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.8 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.6 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.5 spec/extend_steps_spec.rb
allure-ruby-adaptor-api-0.6.4 spec/extend_steps_spec.rb