thoughtbot/climate_control — pull request #14 by maurogeorge (2014-12-04 21:12:37+00:00)
Title: Create RSpec metadata

The [VCR](https://relishapp.com/vcr/vcr/v/2-8-0/docs) uses a API that is possible move the block syntax to a [RSpec metadata](https://relishapp.com/vcr/vcr/v/2-8-0/docs/test-frameworks/usage-with-rspec-metadata).

This

```ruby
it 'my spec' do
VCR.use_cassette('synopsis') do
# code here
end
end
```
became

```ruby
it 'my spec', vcr: { cassette_name: 'synopsis' } do
# code here
end
```

I added the same behavior on Climate Control. So this

```ruby
ClimateControl.modify CONFIRMATION_INSTRUCTIONS_BCC: 'confirmation_bcc@example.com' do
sign_up_as 'john@example.com'
confirm_account_for_email 'john@example.com'
current_email.should bcc_to('confirmation_bcc@example.com')
end
```

became

```ruby
it 'have the correct current_email', climate_control: { CONFIRMATION_INSTRUCTIONS_BCC: 'confirmation_bcc@example.com' } do
sign_up_as 'john@example.com'
confirm_account_for_email 'john@example.com'
current_email.should bcc_to('confirmation_bcc@example.com')
end
```