Check that loadController is called once. #6

Merged
merged 1 commit into from Mar 9, 2012

Conversation

Projects
None yet
2 participants
Contributor

marcenuc commented Mar 9, 2012

Previous test was more strict, because it also checked that loadController was called once. This patch restore previous behaviour maintaining order independence.

Contributor

sp commented Mar 9, 2012

First, thank you for checking my work and holding it to high standards of quality! Much appreciated.

Second, if you check lines 65 & 120 I think you'll see that the test is actually more strict now than it used to be.

Contributor

marcenuc commented Mar 9, 2012

First, I'm evaluating Capsela because it have testability as a feature. Thank you for this.

Second, at lines 61 & 116 you do loaded[name] = 1, then the values in loaded will always be 1, even if loadController is called many times with the same name.

This was not true before, because you used exp.shift().

Using loaded[name] += 1 and initializing the values in loaded to 0, restores the previous behaviour, because if loadController is called twice with the same name, the resulting value will be 2.

Obviously, I may be missing something obvious...

Contributor

sp commented Mar 9, 2012

No, I think you're absolutely right - that failure mode is not accounted for.

@sp sp pushed a commit that referenced this pull request Mar 9, 2012

sp Merge pull request #6 from marcenuc/patch-1
Check that loadController is called once.
6cda68b

@sp sp merged commit 6cda68b into capsela:master Mar 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment