Sha256: 94bcca543ec8ab7cbb71c8aefd7f84fd117a24cf52a683cc4560225bec7d094f

Contents?: true

Size: 611 Bytes

Versions: 10

Compression:

Stored size: 611 Bytes

Contents

require_relative '../spec_helper'

describe Ravelry::PatternType do
  before do
    @type = Ravelry::PatternType.new(pattern_type)
    @data = pattern_type
  end

  it 'creates an instance of PatternType' do
    expect(@type).to be_instance_of(Ravelry::PatternType)
  end

  context 'has and sets reader attributes for' do
    it '#permalink' do
      expect(@type.permalink).to eq(@data[:permalink])
    end

    it '#name' do
      expect(@type.name).to eq(@data[:name])
    end
  end

  context 'class methods' do
    it '#clothing?' do
      expect(@type.clothing?).to eq(@data[:clothing])
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ravelry-0.2.0 spec/ravelry/pattern_type_spec.rb
ravelry-0.1.0 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.9 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.8 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.7 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.6 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.5 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.4 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.2 spec/ravelry/pattern_type_spec.rb
ravelry-0.0.1 spec/ravelry/pattern_type_spec.rb