Pass example metadata to beforeEach/afterEach

Addresses issue #105, which essentially involves porting RSpec
example metadata to Quick. See: https://www.relishapp.com/rspec/rspec-core/docs/metadata/current-example

- Create ExampleMetadata class to encapsulate data on current
  executing example
- Add `beforeEach` and `afterEach` DSL that takes a closure with a metadata argument
- Add functional tests
Yeah, good catch. I wasn't sure of how to test the `afterEach` metadata, I'll try thinking about it some more.

Sent from my iPhone

> On Aug 27, 2014, at 11:55 AM, Jeff Hui <notifications@github.com> wrote:
> 
> In Quick/QuickTests/ExampleMetadataFunctionalTests.swift:
> 
> > +        var currentExampleName = ""
> > +        var lastExampleName = ""
> > +
> > +        beforeEach { (exampleMetadata: ExampleMetadata) -> () in
> > +            currentExampleName = exampleMetadata.example.name
> > +        }
> > +
> > +        afterEach { (exampleMetadata: ExampleMetadata) -> () in
> > +            lastExampleName = exampleMetadata.example.name
> > +        }
> > +
> > +        it("calls beforeEach with the metadata for the first example", { () -> () in
> > +            expect(currentExampleName).to(contain("calls beforeEach with the metadata"))
> > +        })
> > +
> > +        it("calls afterEach with the metadata for the first example", { () -> () in
> Isn't this a test order dependence?
> 
> \
> Reply to this email directly or view it on GitHub.