spec/gradient_spec.rb in teacup-1.2.8 vs spec/gradient_spec.rb in teacup-1.2.9
- old
+ new
@@ -1,22 +1,22 @@
describe "Gradient" do
- tests FirstController
+ tests GradientController
before do
@root_view = window.subviews[0]
end
it "should insert gradient layer when gradient style is set" do
@root_view.style(gradient: { colors: [UIColor.redColor, UIColor.yellowColor] })
- @root_view.layer.sublayers.size.should == 2
+ @root_view.layer.sublayers.size.should == 1
@root_view.layer.sublayers.first.class.should == CAGradientLayer
end
it "should not insert another gradient layer when gradient style is changed" do
@root_view.style(gradient: { colors: [UIColor.redColor, UIColor.yellowColor] })
@root_view.style(gradient: { colors: [UIColor.greenColor, UIColor.whiteColor] })
- @root_view.layer.sublayers.size.should == 2
+ @root_view.layer.sublayers.size.should == 1
end
it "should change gradient layer when gradient style is changed" do
@root_view.style(gradient: { colors: [UIColor.redColor, UIColor.yellowColor] })
before = @root_view.layer.sublayers.first.colors.first
@@ -25,8 +25,8 @@
before.should != after
end
it "should accept CGColors" do
@root_view.style(gradient: { colors: [UIColor.redColor.CGColor, UIColor.yellowColor.CGColor] })
- @root_view.layer.sublayers.size.should == 2
+ @root_view.layer.sublayers.size.should == 1
end
end