Sha256: f867c0c9b2781ca65cf52f52aff23c9eb720dadff556065f1839bd28d25f0297

Contents?: true

Size: 423 Bytes

Versions: 1

Compression:

Stored size: 423 Bytes

Contents

require 'percentable/percent'
require 'percentable/percentize'

class TestClass
  def returns_a_percent
    10
  end
end

class Subject < TestClass
  extend Percentable::Percentize

  percentize :returns_a_percent
end

describe Percentable::Percentize do
  subject { Subject.new }

  it 'should return a percent with value of TestClass' do
    expect(subject.returns_a_percent).to eq Percentable::Percent.new(10)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
percentable-0.0.1 spec/lib/percentable/percentize_spec.rb