Created
August 31, 2012 02:29
-
-
Save keppy/3548104 to your computer and use it in GitHub Desktop.
First tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "minitest_helper" | |
| class EmployeeTest < MiniTest::Unit::TestCase | |
| def setup | |
| super | |
| @employee = Employee.new(first_name: "Jannis", last_name: "Steele") | |
| @user = User.new(login: "Geoblaster", password: "foobar", password_confirmation: "foobar", email: "hero@mcpooch.com") | |
| @employee.user = @user | |
| end | |
| def test_display_name | |
| assert_equal "#{@employee.first_name} #{@employee.last_name}", @employee.display_name | |
| end | |
| def test_user_login | |
| assert_equal "#{@employee.user.login}", @employee.user_login | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment