Skip to content

Commit 7413f46

Browse files
committed
Making input setup and teardown global for all tests.
1 parent fecc0e7 commit 7413f46

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

spec/Setup.Spec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
feature("Masking an Input", function() {
1+
feature("Masking an Input", function() {
22
scenario('Applying a mask to an already masked input',function(){
3-
var input;
43
given("an input with two masks", function(){
5-
input=$("<input />")
4+
input
65
.mask("9")
76
.mask("99");
87
});

spec/SpecRunner.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
importGrammar(jasmine.grammar.FeatureStory);
2828
importGrammar(jasmine.grammar.GWT);
2929

30+
var input;
31+
beforeEach(function(){ input = $("<input />").appendTo("body").focus(); });
32+
afterEach(function(){ input.remove();});
33+
3034
</script>
3135

3236
<!-- include source files here... -->

0 commit comments

Comments
 (0)