Skip to content

Commit

Permalink
Refactor: inline temps
Browse files Browse the repository at this point in the history
  • Loading branch information
nitishr committed Jan 16, 2020
1 parent 7737927 commit 68d6abb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/acceptance/stubbing_method_unnecessarily_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ def teardown
end

def test_should_allow_stubbing_method_unnecessarily
test_result = stub_method_unnecessarily(:allow)
assert_passed(test_result)
assert_passed(stub_method_unnecessarily(:allow))
assert !@logger.warnings.include?(violation_message)
end

def test_should_warn_when_stubbing_method_unnecessarily
test_result = stub_method_unnecessarily(:warn)
assert_passed(test_result)
assert_passed(stub_method_unnecessarily(:warn))
assert @logger.warnings.include?(violation_message)
end

Expand All @@ -31,8 +29,7 @@ def test_should_prevent_stubbing_method_unnecessarily
end

def test_should_default_to_allow_stubbing_method_unnecessarily
test_result = stub_method_unnecessarily
assert_passed(test_result)
assert_passed(stub_method_unnecessarily)
assert !@logger.warnings.include?(violation_message)
end

Expand Down

0 comments on commit 68d6abb

Please sign in to comment.