Refactor #2969

Convert Test::Unit tests to RSpec

Added by James Turnbull about 2 years ago. Updated 21 days ago.

Status:Accepted Start date:12/20/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:testing
Target version:-
Affected Puppet version:0.25.1 Branch:
Keywords:
Votes: 0

Description

Use automatic conversion to convert Test::Unit tests to Rspec.

Here’s some examples of howtos:

A rails specific example

A generic example using the code from this project.

Another rails specific example

An example of just mapping the to rspec without any conversion.


Related issues

related to Puppet - Bug #3312: Unit tests error: test_correct_type_assumptions, test_par... Accepted 02/27/2010
related to Puppet - Bug #3311: Unit tests error: test_modifyingfile: undefined method `a... Accepted 02/27/2010
related to Puppet - Bug #3310: Unit tests error:test_userngroup: Global resource removal... Accepted 02/27/2010
related to Puppet - Bug #3309: Unit tests error: NoMethodError: Internal error: The :gro... Accepted 02/27/2010
related to Puppet - Bug #3308: Unit tests failing: NoMethodError: undefined method `fake... Accepted 02/27/2010

History

Updated by Markus Roberts almost 2 years ago

While I agree with the goal, I’m not sure how far automated conversion will take us. Many of the older tests are idiosyncratically structured and an automated conversion may only further obscure their intent. The minimalistic just run-them-as-if-they-were-rspec solutions are potentially worrisome in that they appear to introduce semantic changes that may subtlety affect the validity of some tests, while not actually addressing the core problem (to wit, that the older tests suck).

But yeah, we need to do something about them.

Updated by Joshua Lifton about 1 month ago

  • Assignee deleted (Markus Roberts)

This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.

Updated by Joshua Lifton about 1 month ago

This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.

Updated by Ben Hughes 21 days ago

  • Description updated (diff)
  • Status changed from Accepted to Unreviewed

Updated by Dan Bode 21 days ago

  • Description updated (diff)
  • Status changed from Unreviewed to Accepted

Also available in: Atom PDF