jnicklas/capybara — pull request #840 by danryan (2012-10-03 23:53:33+00:00)
Title: alias given and given! to let and let!

I use `let` all over the place in vanilla RSpec, but something just didn't feel right using it with the feature DSL. This pull request adds aliases for `let` and `let!` in the form of `given` and `given!`. It's only syntactic sugar but it helps remind me I'm writing acceptance tests.

Using these aliases, the DSL example in the README could be rewritten as:

```ruby
feature "Signing up" do
given(:user) { User.make(:email => 'user@example.com', :password => 'caplin') }

scenario "Signing in as another user" do
within("#session") do
fill_in 'Login', :with => user.email
fill_in 'Password', :with => user.password
end
click_link 'Sign in'
end

end
```