diff options
| author | dwu185 <[email protected]> | 2016-08-28 18:00:57 -0400 |
|---|---|---|
| committer | dwu185 <[email protected]> | 2016-08-28 18:00:57 -0400 |
| commit | ad5543dc897eec7482b8076928f29aa00eedc9e4 (patch) | |
| tree | 91106434b61f07407ab0ffea103307fd8ec83241 | |
| parent | 38cf14dd1872c39708eaa14cfa9b292314f2d1ef (diff) | |
| download | ruby2d-ad5543dc897eec7482b8076928f29aa00eedc9e4.tar.gz ruby2d-ad5543dc897eec7482b8076928f29aa00eedc9e4.zip | |
unix tests edited
| -rw-r--r-- | spec/color_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/color_spec.rb b/spec/color_spec.rb index deafe81..ed23712 100644 --- a/spec/color_spec.rb +++ b/spec/color_spec.rb @@ -7,6 +7,12 @@ RSpec.describe Ruby2D::Color do expect(Ruby2D::Color.is_valid? 'red').to eq true expect(Ruby2D::Color.is_valid? 'balloons').to eq false end + + it 'determines if a color string is valid hex value: # follow by 6 letters/numbers' do + expect(Ruby2D::Color.is_valid? '#c0c0c0').to eq true + expect(Ruby2D::Color.is_valid? '#00000').to eq false + expect(Ruby2D::Color.is_valid? '123456').to eq false + end it 'determines if an array is a valid color' do expect(Ruby2D::Color.is_valid? [1.0, 0, 0, 1.0]).to eq true |
