Sha256: 0ebc506a4264086a7d3e8a8e4c05ddcf07f1a75e22eef3bebab0822eb5bcb3fe

Contents?: true

Size: 556 Bytes

Versions: 3

Compression:

Stored size: 556 Bytes

Contents

require 'spec_helper'

def it_styles_with(*styles)
  supported_styles = unpack_styles(styles)
  spec_styles(supported_styles)
end

def unpack_styles(styles)
  supported_styles = []
  styles.each do |style|
    if Shoes::Common::Style::STYLE_GROUPS[style]
      Shoes::Common::Style::STYLE_GROUPS[style].each{|style| supported_styles << style}
    else
      supported_styles << style
    end
  end
  supported_styles
end

def spec_styles(supported_styles)
  supported_styles.each do |style|
    it_behaves_like "object that styles with #{style}"
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
shoes-core-4.0.0.pre3 spec/shoes/spec_helper.rb
shoes-swt-4.0.0.pre2 spec/shoes/spec_helper.rb
shoes-dsl-4.0.0.pre2 spec/shoes/spec_helper.rb