Skip to content

Commit

Permalink
Add tests for default_instance initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
abinoam committed Jun 30, 2017
1 parent e4d8354 commit 9c1600f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_import.rb
Expand Up @@ -20,6 +20,14 @@ def test_import
assert_respond_to(self, :choose)
assert_respond_to(self, :say)
end

def test_healthy_default_instance_after_import
refute_nil HighLine.default_instance
assert_instance_of HighLine, HighLine.default_instance

# If correctly initialized, it will contain several ins vars.
refute_empty HighLine.default_instance.instance_variables
end

def test_or_ask
old_instance = HighLine.default_instance
Expand Down

0 comments on commit 9c1600f

Please sign in to comment.