Created
September 19, 2022 19:31
-
-
Save noelrappin/b6242257b1856a5774de959bf9fe0c00 to your computer and use it in GitHub Desktop.
This file contains 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
class TestClass | |
extend Quiz::TestCase | |
def with_a_user | |
@user = User.new | |
end | |
def with_an_admin | |
@user = User.new(admin: true) | |
end | |
test { setup: :with_a_user } | |
def user_is_not_an_admin | |
assert_that(@user.admin).is_falsy | |
end | |
test { setup: :with_an_admin } | |
def user_is_an_admin | |
assert_that(@user.admin).is_truthy | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment