Sha256: 8163feabc259c4a5756c7511a70eee03630e9c7d379b70ccba376653963cd2f4

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

# Allure RSpec Adaptor

Adaptor to use the Allure framework along with the RSpec

## What's new

* *0.4.1* - Support for before/after(:step) hooks.
* *0.3.1* - Allure 1.4.0 format support.

## Setup

Add the dependency to your Gemfile

```ruby
 gem 'allure-rspec'
```

And then include it in your spec_helper.rb:

```ruby
    RSpec.configure do |c|
      c.include AllureRSpec::Adaptor
    end
```

## Advanced options

You can specify the directory where the Allure test results will appear. By default it would be 'allure/data' within
your current directory.

```ruby
    AllureRSpec.configure do |c|
      c.output_dir = "/whatever/you/like"
    end
```

## Usage examples

```ruby
describe MySpec do

  before(:step) do |s|
    puts "Before step #{s.current_step}"
  end

  it "should be steps enabled" do

    step "step1" do
      attach_file "screenshot1", take_screenshot_as_file
    end

    step "step2" do
      5.should be > 0
    end

    step "step3" do
      0.should == 0
    end

    attach_file "screenshot2", take_screenshot_as_file
  end
end
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
allure-rspec-0.4.2 README.md