Sha256: 219910b1503cf355365ba2794e864d0a2a55d66c6e9317a789ce2e3d780b086c

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

require_relative '../spec_helper'

describe Ravelry::YarnWeight do
  it 'creates an instance of YarnWeight' do
    yarn_weight = yw_initialize_with_data_and_id
    expect(yarn_weight).to be_instance_of(Ravelry::YarnWeight)
  end

  context 'has and sets reader attributes for' do
    before do
      @yarn_weight = yw_initialize_with_data
    end

    it 'name' do
      expect(@yarn_weight.name).to eq(yarn_weight_hash[:name])
    end

    it 'min_gauge' do
      expect(@yarn_weight.min_gauge).to eq(yarn_weight_hash[:min_gauge])
    end

    it 'wpi' do
      expect(@yarn_weight.wpi).to eq(yarn_weight_hash[:wpi])
    end

    it 'crochet_gauge' do
      expect(@yarn_weight.crochet_gauge).to eq(yarn_weight_hash[:crochet_gauge])
    end

    it 'ply' do
      expect(@yarn_weight.ply).to eq(yarn_weight_hash[:ply])
    end

    it 'knit_gauge' do
      expect(@yarn_weight.knit_gauge).to eq(yarn_weight_hash[:knit_gauge])
    end

    it 'max_gauge' do
      expect(@yarn_weight.max_gauge).to eq(yarn_weight_hash[:max_gauge])
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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