Skip to content

Commit

Permalink
added failing test for missing FormotionScreen title
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmartin committed Jun 30, 2013
1 parent 23981bf commit cb880f8
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ PATH
GEM
remote: https://rubygems.org/
specs:
bubble-wrap (1.3.0)
formotion (1.3.1)
bubble-wrap (>= 1.1.4)
motion-require (~> 0.0.3)
motion-redgreen (0.1.0)
motion-require (0.0.6)
motion-stump (0.2.1)
rake (10.0.4)

Expand All @@ -15,6 +20,7 @@ PLATFORMS

DEPENDENCIES
ProMotion!
formotion
motion-redgreen
motion-stump
rake
1 change: 1 addition & 0 deletions ProMotion.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ Gem::Specification.new do |gem|

gem.add_development_dependency("motion-stump")
gem.add_development_dependency("motion-redgreen")
gem.add_development_dependency("formotion")
gem.add_development_dependency("rake")
end
25 changes: 25 additions & 0 deletions spec/helpers/table_screen_formotion.rb
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
15 changes: 15 additions & 0 deletions spec/unit/tables/formotion_screen_spec.rb
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

0 comments on commit cb880f8

Please sign in to comment.