Skip to content

Instantly share code, notes, and snippets.

View yuvalkarmi's full-sized avatar

Yuval Karmi yuvalkarmi

  • Tel Aviv, Israel
View GitHub Profile
Given a post: "foobar" exists with title: "My awesome post"
And I go to the home page
Then the post: "foobar" should exist with title: "just a post"
Given a teacher: "myteacher" exists with first_name: "Joe"
And I go to the home page
Then the teacher: "myteacher" should exist with first_name: "Joe"
Given a teacher: "myteacher" exists with first_name: "Joe"
And I go to the home page
Then the teacher: "myteacher" should exist with first_name: "Joe"
The model: 'the post: "foobar"' is not known in this scenario.
bundle install
bundle install
gem 'database_cleaner'
gem 'database_cleaner'
@yuvalkarmi
yuvalkarmi / partial_app_template
Created November 27, 2010 04:51
Apply Application Templates to Existing Rails Applications
rake rails:template LOCATION=automate.rb
@user = User.find_by_username('foobar')
@user.reset_persistence_token
//login functionality here