Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

access metadata from before(:all) #6

@dchelimsky

Description

@dchelimsky

As of 2.0.0.beta.2, you can access the running example's metadata hash from an example or before/after(:each). Let's support accessing it from before/after(:all) as well - at least at the example group level. e.g.

describe "something" do
  before(:all) do
    running_example_group.metadata[:foo] = 'bar'
  end
  it "does something" do
    running_example.metadata[:example_group][:foo].should eq('bar")
    # or
    running_example_group.metadata[:foo].should eq("bar")
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions