summaryrefslogtreecommitdiffhomepage
path: root/test/color_spec.rb
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-09-28 13:22:23 -0700
committerTom Black <[email protected]>2018-09-28 13:22:23 -0700
commit9b51a3b4718b082301ff70b706ac53bec8668ac9 (patch)
tree9a27a9933548f7c9446b756f42fc1928a8cf2a63 /test/color_spec.rb
parentd0a2823398fb0b26b75a168ec13816c8873cceb1 (diff)
downloadruby2d-9b51a3b4718b082301ff70b706ac53bec8668ac9.tar.gz
ruby2d-9b51a3b4718b082301ff70b706ac53bec8668ac9.zip
Color enhancements
New shortcuts for setting color values, like `.color.r/g/b/a` and simply `.r/g/b/a`; allow the British English spelling "colour"
Diffstat (limited to 'test/color_spec.rb')
-rw-r--r--test/color_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/color_spec.rb b/test/color_spec.rb
index 4ed21aa..4f0ec35 100644
--- a/test/color_spec.rb
+++ b/test/color_spec.rb
@@ -32,9 +32,13 @@ RSpec.describe Ruby2D::Color do
s1.opacity = 0.5
s2 = Square.new(color: ['red', 'green', 'blue', 'yellow'])
s2.opacity = 0.7
- expect(s1.opacity).to eq 0.5
- expect(s2.opacity).to eq 0.7
+ expect(s1.opacity).to eq(0.5)
+ expect(s2.opacity).to eq(0.7)
end
end
+ it "allows British English spelling of color" do
+ expect(Ruby2D::Colour).to eq(Ruby2D::Color)
+ end
+
end