Sha256: 61f64f5917e8bd4459558c350dbf1427e858e5d1c18cb471e436859ddb606657

Contents?: true

Size: 506 Bytes

Versions: 9

Compression:

Stored size: 506 Bytes

Contents

require 'helper'
require 'plucky/normalizers/integer'

describe Plucky::Normalizers::Integer do
  context "with nil" do
    it "returns nil" do
      subject.call(nil).should be_nil
    end
  end

  context "with an integer" do
    it "returns an integer" do
      subject.call(1).should be(1)
      subject.call(3232).should be(3232)
    end
  end

  context "with a string" do
    it "returns a string" do
      subject.call('1').should be(1)
      subject.call('3232').should be(3232)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
plucky-0.8.0 spec/plucky/normalizers/integer_spec.rb
plucky-0.7.0 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.6 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.5 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.4 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.3 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.2 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.1 spec/plucky/normalizers/integer_spec.rb
plucky-0.6.0 spec/plucky/normalizers/integer_spec.rb