Sha256: a4c0febace594cbbb7d87a23d49e8ba87f24e5a1d8c2644d59ad033d30eab813

Contents?: true

Size: 661 Bytes

Versions: 12

Compression:

Stored size: 661 Bytes

Contents

require 'spec_helper'

describe RailsBestPractices::Core::Nil do
  let(:core_nil) { RailsBestPractices::Core::Nil.new }

  context "to_s" do
    it "should return self" do
      core_nil.to_s.should == core_nil
    end
  end

  context "hash_size" do
    it "should return 0" do
      core_nil.hash_size.should == 0
    end
  end

  context "method_missing" do
    it "should return self" do
      core_nil.undefined.should == core_nil
    end
  end

  context "present?" do
    it "should return false" do
      core_nil.should_not be_present
    end
  end

  context "blank?" do
    it "should return true" do
      core_nil.should be_blank
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
rails_best_practices-gorgeouscode-1.0.0 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.9.0 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.8.0 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.7.2 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.7.1 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.7.0 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.6.0 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.5.3 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.5.2 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.5.1 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.5.0 spec/rails_best_practices/core/nil_spec.rb
rails_best_practices-1.4.0 spec/rails_best_practices/core/nil_spec.rb