forked from jamonholmgren/ProMotion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added failing test for missing FormotionScreen title
- Loading branch information
1 parent
23981bf
commit cb880f8
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class TestFormotionScreen < PM::FormotionScreen | ||
|
||
title "Formotion Test" | ||
|
||
def table_data | ||
@data ||= { | ||
sections: [{ | ||
title: "Currency", | ||
key: :currency, | ||
select_one: true, | ||
rows: [{ | ||
title: "EUR", | ||
key: :eur, | ||
value: true, | ||
type: :check | ||
}, { | ||
title: "USD", | ||
key: :usd, | ||
type: :check | ||
}] | ||
}] | ||
} | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
describe "PM::FormotionScreen" do | ||
|
||
before do | ||
@screen = TestFormotionScreen.new | ||
end | ||
|
||
it "should store title" do | ||
TestFormotionScreen.get_title.should == 'Formotion Test' | ||
end | ||
|
||
it "should set default title on new instances" do | ||
@screen.title.should == "Formotion Test" | ||
end | ||
|
||
end |