Sha256: 138c7740fc1758ca331ccfafa0c8ca5e0cb555703a7cc7eb8e308954da1a3bb7

Contents?: true

Size: 633 Bytes

Versions: 84

Compression:

Stored size: 633 Bytes

Contents

require 'spec_helper'

describe Dragonfly::HashWithCssStyleKeys do
  
  before(:each) do
    @hash = Dragonfly::HashWithCssStyleKeys[
      :font_style => 'normal',
      :'font-weight' => 'bold',
      'font_colour' => 'white',
      'font-size' => 23,
      :hello => 'there'
    ]
  end

  describe "accessing using underscore symbol style" do
    it{ @hash[:font_style].should == 'normal' }
    it{ @hash[:font_weight].should == 'bold' }
    it{ @hash[:font_colour].should == 'white' }
    it{ @hash[:font_size].should == 23 }
    it{ @hash[:hello].should == 'there' }
    it{ @hash[:non_existent_key].should be_nil }
  end

end

Version data entries

84 entries across 84 versions & 3 rubygems

Version Path
dragonfly-1.4.1 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.4.0 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.3.0 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.2.1 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.2.0 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.1.5 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.1.4 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.1.3 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.1.2 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.1.1 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.1.0 spec/dragonfly/hash_with_css_style_keys_spec.rb
classiccms-0.7.5 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/hash_with_css_style_keys_spec.rb
classiccms-0.7.4 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/hash_with_css_style_keys_spec.rb
classiccms-0.7.3 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.0.12 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.0.11 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.0.10 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.0.9 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.0.8 spec/dragonfly/hash_with_css_style_keys_spec.rb
dragonfly-1.0.7 spec/dragonfly/hash_with_css_style_keys_spec.rb