spec/ios/view_spec.rb in teacup-2.1.7 vs spec/ios/view_spec.rb in teacup-2.1.8
- old
+ new
@@ -16,10 +16,13 @@
@view = CustomLabel.new
@stylesheet = Teacup::Stylesheet.new do
style :label,
text: "Stylesheet1 Label1"
+
+ style :new_style,
+ text: 'new style'
end
end
describe 'stylename=' do
it 'should work' do
@@ -39,9 +42,17 @@
describe 'apply_stylename=' do
it 'should set the style when a stylesheet is there' do
@view.stylesheet = @stylesheet
@view.apply_stylename(:label)
@view.text.should == "Stylesheet1 Label1"
+ end
+ end
+
+ describe 'add_style_class' do
+ it "should add the new style to the view" do
+ @view.stylesheet = @stylesheet
+ @view.add_style_class :new_style
+ @view.text.should == "new style"
end
end
describe 'stylesheet=' do
it 'should work' do